
                                                            
{
  "version": "1.0.0",
  "timestamp": "2026-04-03T07:19:30.085546+00:00",
  "config": {
    "mode": "full",
    "languages": [
      "javascript",
      "python",
      "tsx"
    ],
    "baseline_available": false,
    "ai_focus": false,
    "detected_frameworks": [
      "scss"
    ]
  },
  "files": [
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\__init__.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 181,
      "functions": [
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 20,
        "comment_ratio": 0.2308,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\publish_page_revision.py",
      "language": "python",
      "line_count": 64,
      "token_estimate": 519,
      "functions": [
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.099,
          "ai_signals": []
        },
        {
          "name": "_after_publish",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.099,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 14,
        "function_length_stddev": 7.07,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 48,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4949,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.3,
        "mechanical": 93.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\admin_url_finder.py",
      "language": "python",
      "line_count": 108,
      "token_estimate": 813,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "construct_edit_url",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "register_admin_url_finder",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 83,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 83,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 83,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 84,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 84,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 84,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.026,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 102,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3441,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 6.12,
        "function_length_stddev": 5.33,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 72,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.56,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.097222,
        "structural_uniformity": 0.1298,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.94,
        "mechanical": 73.94,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\delete.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 208,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 23,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5.5,
        "function_length_stddev": 4.95,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 27,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.53,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.037037,
        "structural_uniformity": 0.1,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.24,
        "mechanical": 89.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\views.py",
      "language": "python",
      "line_count": 164,
      "token_estimate": 1317,
      "functions": [
        {
          "name": "get_detail_default_fields",
          "type": "decorated_definition",
          "line_start": 76,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_root_page",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "get_type_info",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 114,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3972,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "listing_view",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "detail_view",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "action_view",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1056,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 151,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 151,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4556,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 8.89,
        "function_length_stddev": 4.2,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 149,
        "comment_ratio": 0.0915,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.49,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.020134,
        "structural_uniformity": 0.5279,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.86,
        "mechanical": 92.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\__init__.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 77,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'DIRECT_FORM_FIELD_OVERRIDES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'FORM_FIELD_OVERRIDES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailAdminModelForm' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailAdminModelFormMetaclass' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'formfield_for_dbfield' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n    WagtailAdminModelForm,\n    WagtailAdminModelFormMetaclass,\n    formfield_for_dbfield,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 9,
              "description": "Unused import: from .pages import WagtailAdminPageForm",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailAdminPageForm' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import WagtailAdminPageForm",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 9,
        "comment_ratio": 0.1,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 6
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\pages.py",
      "language": "python",
      "line_count": 297,
      "token_estimate": 2871,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 71,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 38,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 61,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 66,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 82,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 14,
              "description": "Function is 71 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 71 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 71 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.405,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 86,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function clean is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1384,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "show_comments_toggle",
          "type": "decorated_definition",
          "line_start": 186,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "serialize_comments",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 232,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 237,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.405,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 258,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2495,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 275,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.305,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "clean_parent_page",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.055,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 19.62,
        "function_length_stddev": 18.42,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 283,
        "comment_ratio": 0.0471,
        "comment_what_ratio": 0.2143,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.04947,
        "structural_uniformity": 0.0608,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.28,
        "mechanical": 78.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\mail.py",
      "language": "python",
      "line_count": 412,
      "token_estimate": 3827,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "__enter__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "__exit__",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "send_mail",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "send_notification",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 126,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 126 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 102,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 108,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 108,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 110,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 110,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 120,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 120,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 126,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 126,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 70,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function send_notification is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "can_handle",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_valid_recipients",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_template_base_prefix",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 155,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_template_set",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 163,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "send_notifications",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_recipient_users",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_valid_recipients",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_template_set",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 219,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3125,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "send_emails",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 4,
            "parameter_count": 4,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 269,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 269 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 237,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 245,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 245,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 249,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 249,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 263,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 263,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 269,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 269,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 275,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 231,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function send_emails is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "send_notifications",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_recipient_users",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_recipient_users",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_recipient_users",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 345,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 345,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 350,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 350,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "can_handle",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0625,
          "ai_signals": []
        },
        {
          "name": "get_recipient_users",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 387,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 387,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 397,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 397,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4125,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 29,
        "avg_function_length": 10.9,
        "function_length_stddev": 14.64,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 40,
        "code_lines": 372,
        "comment_ratio": 0.0971,
        "comment_what_ratio": 0.3125,
        "naming_avg_length": 8.85,
        "debug_artifacts": [],
        "ai_smell_count": 34,
        "ai_smell_density": 0.091398,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.48,
        "mechanical": 73.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0006_formstate.py",
      "language": "python",
      "line_count": 66,
      "token_estimate": 541,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 65,
        "comment_ratio": 0.0152,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.97,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\comment_panel.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 329,
      "functions": [
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "clean_name",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "show_panel_furniture",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.25,
        "function_length_stddev": 6.55,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 36,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.51,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\page_utils.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 313,
      "functions": [
        {
          "name": "_get_page_edit_handler",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 35,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 35,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 12,
              "description": "Function is 24 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 24 lines (> 22 dynamic threshold)",
                "impact": "Function _get_page_edit_handler is 24 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 24,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 34,
        "comment_ratio": 0.1282,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.47,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.088235,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.74,
        "mechanical": 73.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\converters\\editor_html.py",
      "language": "python",
      "line_count": 184,
      "token_estimate": 1592,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "embed_handlers",
          "type": "decorated_definition",
          "line_start": 59,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "link_handlers",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "clean_tag_node",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 81,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 94,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 100,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 75,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function clean_tag_node is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 122,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "whitelister",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "to_database_format",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "html_rewriter",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 140,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2692,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "from_database_format",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_db_attributes",
          "type": "decorated_definition",
          "line_start": 162,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 171,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 8.57,
        "function_length_stddev": 9.58,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 154,
        "comment_ratio": 0.163,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.56,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.045455,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.92,
        "mechanical": 85.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\signals.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 73,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.signals import init_new_page",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'init_new_page' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.signals import init_new_page",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 11,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.fileupload-process.js",
      "language": "javascript",
      "line_count": 173,
      "token_estimate": 1496,
      "functions": [
        {
          "name": "func",
          "type": "function_expression",
          "line_start": 73,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1371,
          "ai_signals": []
        },
        {
          "name": "func",
          "type": "function_expression",
          "line_start": 142,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1371,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9,
        "function_length_stddev": 2.83,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 37,
        "code_lines": 136,
        "comment_ratio": 0.2139,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6857,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\telepath\\__init__.py",
      "language": "python",
      "line_count": 71,
      "token_estimate": 409,
      "functions": [
        {
          "name": "base_media",
          "type": "decorated_definition",
          "line_start": 6,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 8,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "adapter",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 62,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 25,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function adapter is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1522,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 17.67,
        "function_length_stddev": 24.58,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 40,
        "comment_ratio": 0.4366,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.51,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.075,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.95,
        "mechanical": 78.95,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\header.stories.tsx",
      "language": "tsx",
      "line_count": 41,
      "token_estimate": 199,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 23,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 23,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "tsx_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: import React from 'react';",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'React' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import React from 'react';",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 3,
        "comment_lines": 0,
        "code_lines": 41,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.26,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.02439,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.9,
        "mechanical": 93.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_bulk_actions\\test_bulk_unpublish.py",
      "language": "python",
      "line_count": 313,
      "token_estimate": 3000,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 22,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 29,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 43,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5352,
          "ai_signals": [
            "High anti-pattern density (0.94)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_view",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 60,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4987,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_view_invalid_page_id",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2071,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_view_bad_permissions",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 90,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 101,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 107,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5571,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_view_post",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 126,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 130,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 136,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5252,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_after_unpublish_page",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 149,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 158,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 160,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5571,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_before_unpublish_page",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 169,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 178,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5571,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_descendants_view",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 190,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4015,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 207,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 214,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 234,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 235,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 249,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5372,
          "ai_signals": [
            "High anti-pattern density (0.94)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_descendants_view",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 265,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4129,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_include_children_view_post",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 284,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 288,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 291,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 292,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5571,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_unpublish_not_include_children_view_post",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 306,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 310,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5571,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 23.58,
        "function_length_stddev": 11.32,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 57,
        "code_lines": 256,
        "comment_ratio": 0.1821,
        "comment_what_ratio": 0.5152,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 29,
        "ai_smell_density": 0.113281,
        "structural_uniformity": 0.5201,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.18,
        "mechanical": 64.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_explorer_view.py",
      "language": "python",
      "line_count": 1453,
      "token_estimate": 15398,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "assertContainsActiveFilter",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 57,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explore",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 71,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 75,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 75,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 99,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 100,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 106,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 66,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_explore is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explore_results",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 115,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 116,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 118,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 118,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explore_root",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 137,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 138,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 139,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explore_root_shows_icon",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 149,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4275,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 165,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 166,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 169,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 169,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_content_type",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 201,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 206,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 208,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 211,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 211,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 215,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 174,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_ordering_by_content_type is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_search_results_by_created_at",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 226,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 229,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 229,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_search_results_by_content_type",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 240,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 243,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 246,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_change_default_child_page_ordering_attribute",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 262,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 262,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 267,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_change_default_child_page_ordering_method",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 287,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 290,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 290,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 295,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reverse_ordering",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 306,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 307,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 310,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 310,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_last_revision_forward",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_circuit_breaker_inference",
              "severity": "medium",
              "line": 315,
              "description": "ML inference endpoint without circuit breaker -- cascading failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 321,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 322,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 326,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 326,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_ordering",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 337,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 338,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reordering",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 346,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 347,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 350,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 350,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 356,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reordering_disabled_when_searching_or_filtering",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 359,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 359,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 365,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 373,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 376,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 380,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_explorer_page_queryset_hook",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 391,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 392,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_explorer_page_queryset_hook_with_ordering",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 410,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 407,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 407,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_page_listing_buttons_hook_with_new_signature",
          "type": "function_definition",
          "line_start": 412,
          "line_end": 432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 417,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 430,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4692,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "make_pages",
          "type": "function_definition",
          "line_start": 434,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 435,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 453,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 456,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 457,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_invalid",
          "type": "function_definition",
          "line_start": 460,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 470,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 473,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 484,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 488,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 489,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_pagination_with_custom_ordering",
          "type": "function_definition",
          "line_start": 492,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 502,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 505,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 509,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_thousand_separators_in_bulk_action_checkbox",
          "type": "decorated_definition",
          "line_start": 511,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": [],
          "decorators": [
            "override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)"
          ]
        },
        {
          "name": "test_listing_uses_specific_models",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "make_event_pages",
          "type": "function_definition",
          "line_start": 552,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 553,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4275,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_exploring_uses_specific_page_with_custom_display_title",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 578,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_parent_page_is_specific",
          "type": "function_definition",
          "line_start": 580,
          "line_end": 586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 586,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explorer_no_perms",
          "type": "function_definition",
          "line_start": 588,
          "line_end": 604,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 592,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3418,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_explore_with_missing_page_model",
          "type": "function_definition",
          "line_start": 606,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 606,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 606,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 609,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 621,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 628,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 630,
          "line_end": 640,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 630,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 630,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 636,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 638,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 638,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_results",
          "type": "function_definition",
          "line_start": 642,
          "line_end": 652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 648,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 650,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 650,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_searches_descendants",
          "type": "function_definition",
          "line_start": 654,
          "line_end": 673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 657,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 657,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 672,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 672,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_whole_tree",
          "type": "function_definition",
          "line_start": 675,
          "line_end": 686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 681,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 681,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_page_type",
          "type": "function_definition",
          "line_start": 688,
          "line_end": 716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 693,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 693,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 699,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 699,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 710,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 711,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 712,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 713,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 715,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 716,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_locale_and_search",
          "type": "decorated_definition",
          "line_start": 718,
          "line_end": 734,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 719,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 719,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 728,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 728,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_filter_by_date_updated",
          "type": "function_definition",
          "line_start": 736,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 750,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 750,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4692,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_filter_by_owner",
          "type": "function_definition",
          "line_start": 758,
          "line_end": 793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 787,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 787,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3303,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_filter_by_edited_by_user",
          "type": "function_definition",
          "line_start": 795,
          "line_end": 830,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 824,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 824,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3303,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_filter_by_site",
          "type": "function_definition",
          "line_start": 832,
          "line_end": 854,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 848,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 848,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4402,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_filter_by_has_child_pages",
          "type": "function_definition",
          "line_start": 856,
          "line_end": 890,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 869,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 869,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 882,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 882,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_filter",
          "type": "function_definition",
          "line_start": 892,
          "line_end": 906,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 898,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3692,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_explore_custom_permissions",
          "type": "function_definition",
          "line_start": 908,
          "line_end": 918,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_add_child_not_shown_when_no_subpage_type_available_to_create",
          "type": "function_definition",
          "line_start": 920,
          "line_end": 941,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 934,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.295,
          "ai_signals": []
        },
        {
          "name": "test_breadcrumb_next_present",
          "type": "function_definition",
          "line_start": 947,
          "line_end": 956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_breadcrumb_uses_specific_titles",
          "type": "function_definition",
          "line_start": 958,
          "line_end": 985,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 974,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 985,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3859,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_side_panel_present",
          "type": "function_definition",
          "line_start": 991,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1000,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3692,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1011,
          "line_end": 1024,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_admin_at_root",
          "type": "function_definition",
          "line_start": 1029,
          "line_end": 1044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_searching_at_root",
          "type": "function_definition",
          "line_start": 1046,
          "line_end": 1063,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_admin_at_non_site_page",
          "type": "function_definition",
          "line_start": 1065,
          "line_end": 1082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_searching_at_non_site_page",
          "type": "function_definition",
          "line_start": 1084,
          "line_end": 1105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_admin_at_site_page",
          "type": "function_definition",
          "line_start": 1107,
          "line_end": 1114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_nonadmin_at_root",
          "type": "function_definition",
          "line_start": 1119,
          "line_end": 1136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_nonadmin_at_non_site_page",
          "type": "function_definition",
          "line_start": 1138,
          "line_end": 1158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_nonadmin_at_site_page",
          "type": "function_definition",
          "line_start": 1160,
          "line_end": 1167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_bad_permissions_at_root",
          "type": "function_definition",
          "line_start": 1172,
          "line_end": 1181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_bad_permissions_at_non_site_page",
          "type": "function_definition",
          "line_start": 1183,
          "line_end": 1194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_bad_permissions_at_site_page",
          "type": "function_definition",
          "line_start": 1196,
          "line_end": 1210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_admin_can_explore_every_page",
          "type": "function_definition",
          "line_start": 1248,
          "line_end": 1252,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_sees_root_page_as_explorer_root",
          "type": "function_definition",
          "line_start": 1254,
          "line_end": 1260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1259,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1259,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_sees_breadcrumbs_up_to_root_page",
          "type": "function_definition",
          "line_start": 1262,
          "line_end": 1299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1268,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1277,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1280,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1288,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1291,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1299,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1262,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_admin_sees_breadcrumbs_up_to_root_page is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_sees_breadcrumbs_up_to_cca",
          "type": "function_definition",
          "line_start": 1301,
          "line_end": 1328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1317,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1320,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1328,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_sees_non_hidden_root",
          "type": "function_definition",
          "line_start": 1330,
          "line_end": 1344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1338,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1344,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_home_page_changes_with_permissions",
          "type": "function_definition",
          "line_start": 1346,
          "line_end": 1352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1350,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1350,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1352,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1352,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_breadcrumb_with_no_user_permissions",
          "type": "function_definition",
          "line_start": 1354,
          "line_end": 1362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1369,
          "line_end": 1375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 1377,
          "line_end": 1393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1381,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3418,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 1395,
          "line_end": 1412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1400,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3303,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1418,
          "line_end": 1427,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1429,
          "line_end": 1430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1359,
          "ai_signals": []
        },
        {
          "name": "test_in_workflow_status",
          "type": "function_definition",
          "line_start": 1432,
          "line_end": 1452,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1444,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1446,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4692,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 74,
        "avg_function_length": 17.42,
        "function_length_stddev": 8.74,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 201,
        "code_lines": 1252,
        "comment_ratio": 0.1383,
        "comment_what_ratio": 0.181,
        "naming_avg_length": 7.34,
        "debug_artifacts": [],
        "ai_smell_count": 159,
        "ai_smell_density": 0.126997,
        "structural_uniformity": 0.4984,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.94,
        "mechanical": 71.94,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_revisions.py",
      "language": "python",
      "line_count": 684,
      "token_estimate": 6646,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_get_revisions_index",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "request_preview_revision",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_preview_revision",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_preview_revision_with_no_page_permissions_redirects_to_admin",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 85,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4066,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_preview_revision_forbidden_without_permission",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 101,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 101,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5232,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_revert_revision",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 123,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 138,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3853,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_scheduled_revision",
          "type": "decorated_definition",
          "line_start": 142,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2014-12-20 12:00:00\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_revert_revision",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 198,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 199,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5232,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 268,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 273,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 274,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 276,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 279,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 240,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_compare_revisions is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5232,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_compare_revisions_earliest",
          "type": "function_definition",
          "line_start": 285,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions_latest",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions_live",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 342,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3677,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_comparison_as_superuser",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 368,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4066,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_comparison_as_ordinary_user",
          "type": "function_definition",
          "line_start": 372,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 374,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3791,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_base_form_class_used",
          "type": "function_definition",
          "line_start": 434,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions",
          "type": "function_definition",
          "line_start": 447,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 469,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 508,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4232,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_unschedule_view_invalid_page_id",
          "type": "function_definition",
          "line_start": 511,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view_invalid_revision_id",
          "type": "function_definition",
          "line_start": 523,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view_bad_permissions",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 546,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3254,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view_post",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view_post_with_next_url",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 626,
          "line_end": 637,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "test_unschedule_view",
          "type": "function_definition",
          "line_start": 639,
          "line_end": 652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 651,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4232,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_unschedule_view_post",
          "type": "function_definition",
          "line_start": 654,
          "line_end": 683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1732,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 31,
        "avg_function_length": 19.26,
        "function_length_stddev": 8.5,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 71,
        "code_lines": 613,
        "comment_ratio": 0.1038,
        "comment_what_ratio": 0.3077,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 19,
        "ai_smell_density": 0.030995,
        "structural_uniformity": 0.5584,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.47,
        "mechanical": 89.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_buttons_hooks.py",
      "language": "python",
      "line_count": 487,
      "token_estimate": 4628,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1427,
          "ai_signals": []
        },
        {
          "name": "test_register_page_listing_buttons_deprecated_class",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 53,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 56,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 58,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_page_listing_buttons_new_signature",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 80,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 83,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 85,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_page_listing_more_buttons_with_new_signature",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 111,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 114,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 116,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_button_with_dropdown_with_new_signature",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 160,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 163,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 165,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 122,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_button_with_dropdown_with_new_signature is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4227,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_delete_button_with_next_url",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 186,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_buttons_with_rel_attribute",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 199,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3177,
          "ai_signals": []
        },
        {
          "name": "test_delete_button_with_invalid_next_url",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 225,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 233,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.412,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_reorder_button_visibility",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 243,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 252,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 257,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 266,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_page_header_buttons_new_signature",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 294,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2827,
          "ai_signals": []
        },
        {
          "name": "test_hide_dropdown_on_breadcrumbs_open_and_close",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_delete_button_with_next_url",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 330,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3486,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_delete_button_with_invalid_next_url",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 350,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 362,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 370,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 334,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_delete_button_with_invalid_next_url is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_child_not_shown_when_no_subpage_type_available_to_create",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 389,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3486,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1427,
          "ai_signals": []
        },
        {
          "name": "test_eq",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1427,
          "ai_signals": []
        },
        {
          "name": "test_lt",
          "type": "function_definition",
          "line_start": 424,
          "line_end": 436,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 428,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.412,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_le",
          "type": "function_definition",
          "line_start": 438,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 442,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 448,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_gt",
          "type": "function_definition",
          "line_start": 458,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 462,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.412,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_ge",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 476,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 482,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 22.05,
        "function_length_stddev": 10.32,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 53,
        "code_lines": 434,
        "comment_ratio": 0.1088,
        "comment_what_ratio": 0.1818,
        "naming_avg_length": 7.81,
        "debug_artifacts": [],
        "ai_smell_count": 35,
        "ai_smell_density": 0.080645,
        "structural_uniformity": 0.5318,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.02,
        "mechanical": 75.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_dismissibles.py",
      "language": "python",
      "line_count": 66,
      "token_estimate": 667,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2972,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_get_initial",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 18,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6472,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_patch_valid",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 27,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6472,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_patch_invalid",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2972,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2972,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_get_without_userprofile",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 52,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6472,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "test_patch_without_userprofile",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 64,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6154,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 7.29,
        "function_length_stddev": 2.29,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 61,
        "comment_ratio": 0.0758,
        "comment_what_ratio": 0.8,
        "naming_avg_length": 6.95,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.065574,
        "structural_uniformity": 0.6859,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.61,
        "mechanical": 83.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_keyboard_shortcuts.py",
      "language": "python",
      "line_count": 271,
      "token_estimate": 2592,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_feedback",
              "severity": "medium",
              "line": 16,
              "description": "LangSmith runs without feedback collection -- no signal for evaluation or fine-tuning",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_get_keyboard_key_labels_for_default",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 18,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 20,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 20,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 21,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 28,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_get_keyboard_key_labels_for_mac_os",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 33,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 43,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_get_keyboard_key_labels_for_windows",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 61,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 63,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.254,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_trigger_in_sidebar",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 77,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4131,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_dialog",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 100,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 103,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_with_comments_enabled",
          "type": "decorated_definition",
          "line_start": 115,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 123,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 126,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=True)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_with_comments_disabled",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 144,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 147,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "test_account_link_in_modal",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 165,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4728,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_modal_shows_disabled_info_when_keyboard_shortcuts_disabled",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 184,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4874,
          "ai_signals": [
            "High anti-pattern density (0.67)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_modal_shows_enabled_info_when_shortcuts_enabled",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 196,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5233,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.254,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_mac_useragent_and_behavior",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 219,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 219,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 220,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 220,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 226,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_with_comments_enabled",
          "type": "decorated_definition",
          "line_start": 230,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 238,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 241,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=True)"
          ]
        },
        {
          "name": "test_keyboard_shortcuts_with_comments_disabled",
          "type": "decorated_definition",
          "line_start": 251,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 259,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 262,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.604,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 14.88,
        "function_length_stddev": 5.9,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 38,
        "code_lines": 233,
        "comment_ratio": 0.1402,
        "comment_what_ratio": 0.6667,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 44,
        "ai_smell_density": 0.188841,
        "structural_uniformity": 0.6035,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.54,
        "mechanical": 73.54,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_reports_views.py",
      "language": "python",
      "line_count": 1517,
      "token_estimate": 13943,
      "functions": [
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 45,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "assertActiveFilter",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "assertActiveFilterNotRendered",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "assertBreadcrumbs",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "assertPageTitle",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 88,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 122,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 125,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 129,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 136,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 172,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 175,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 178,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 179,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 186,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 115,
              "description": "Function is 88 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 88 lines (> 37 dynamic threshold)",
                "impact": "Function test_simple is 88 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 208,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 211,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 227,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 230,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_no_permissions",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 239,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3187,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 280,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_xlsx_export is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1146,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_live",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 355,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2604,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_filter_by_user",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 90,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 386,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 392,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 375,
              "description": "Function is 90 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 90 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 90 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1437,
          "ai_signals": []
        },
        {
          "name": "assert_log_entries",
          "type": "function_definition",
          "line_start": 466,
          "line_end": 468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 467,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assert_filter_actions",
          "type": "function_definition",
          "line_start": 470,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 471,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unfiltered",
          "type": "function_definition",
          "line_start": 480,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 484,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 485,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 513,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 545,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 480,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_unfiltered is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2883,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        },
        {
          "name": "test_filter_by_action",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 574,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 573,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1567,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_action_multiple",
          "type": "function_definition",
          "line_start": 576,
          "line_end": 602,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_timestamp",
          "type": "function_definition",
          "line_start": 604,
          "line_end": 663,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 604,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_filter_by_timestamp is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0854,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_user",
          "type": "function_definition",
          "line_start": 665,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_label",
          "type": "function_definition",
          "line_start": 674,
          "line_end": 677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 674,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 675,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_object_type",
          "type": "function_definition",
          "line_start": 679,
          "line_end": 707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 681,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 681,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 698,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 698,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_is_commenting_action",
          "type": "function_definition",
          "line_start": 709,
          "line_end": 765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 723,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 736,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 751,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 764,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 709,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_is_commenting_action is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3341,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_log_entry_with_stale_content_type",
          "type": "function_definition",
          "line_start": 767,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 769,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 775,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_log_entry_with_null_content_type",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 787,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3453,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_decorated_queryset",
          "type": "function_definition",
          "line_start": 795,
          "line_end": 812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_all_locales",
          "type": "function_definition",
          "line_start": 824,
          "line_end": 829,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 827,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_format",
          "type": "function_definition",
          "line_start": 831,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 834,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 846,
          "line_end": 849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "publish_home_page",
          "type": "function_definition",
          "line_start": 851,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 861,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 864,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 867,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 868,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 870,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_displays_only_published_pages",
          "type": "function_definition",
          "line_start": 874,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 889,
          "line_end": 903,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 897,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2604,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 905,
          "line_end": 929,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 931,
          "line_end": 963,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export_without_published_by",
          "type": "function_definition",
          "line_start": 965,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 965,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_xlsx_export_without_published_by is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1124,
          "ai_signals": []
        },
        {
          "name": "test_report_renders_when_page_publisher_deleted",
          "type": "function_definition",
          "line_start": 1007,
          "line_end": 1017,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1023,
          "line_end": 1024,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1026,
          "line_end": 1028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 1030,
          "line_end": 1044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1034,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1037,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 1046,
          "line_end": 1064,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1050,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1053,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1071,
          "line_end": 1074,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_live",
          "type": "function_definition",
          "line_start": 1076,
          "line_end": 1086,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_filter_by_content_type",
          "type": "function_definition",
          "line_start": 1088,
          "line_end": 1106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1096,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2113,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_filter_by_last_published_at",
          "type": "function_definition",
          "line_start": 1108,
          "line_end": 1115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1127,
          "line_end": 1128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "display_name",
          "type": "decorated_definition",
          "line_start": 1130,
          "line_end": 1132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1134,
          "line_end": 1148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1137,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1140,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1143,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1144,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1146,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_displays_only_page_types",
          "type": "function_definition",
          "line_start": 1150,
          "line_end": 1167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1154,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1154,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1157,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1157,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1161,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_displays_wagtailcore_page_if_has_instances",
          "type": "function_definition",
          "line_start": 1169,
          "line_end": 1187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1171,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1171,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1191,
          "line_end": 1218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_queryset_ordering",
          "type": "function_definition",
          "line_start": 1220,
          "line_end": 1236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1227,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1227,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 1228,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1229,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1229,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 1230,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 1234,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 1236,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_queryset_last_edited_page",
          "type": "function_definition",
          "line_start": 1238,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1263,
          "line_end": 1266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_locale_filtering",
          "type": "function_definition",
          "line_start": 1268,
          "line_end": 1336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1293,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1294,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1294,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1297,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1297,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1299,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1299,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1312,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1313,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1313,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1316,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1316,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1318,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1318,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1329,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1268,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_locale_filtering is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_site_filtering_with_single_site",
          "type": "function_definition",
          "line_start": 1338,
          "line_end": 1349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1344,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3187,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_site_filtering_with_multiple_sites",
          "type": "function_definition",
          "line_start": 1351,
          "line_end": 1399,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1373,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1374,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1374,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1377,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1377,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1379,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1379,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1388,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1389,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1389,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1393,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1393,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1399,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1399,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1351,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_site_filtering_with_multiple_sites is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_locale_choices",
          "type": "decorated_definition",
          "line_start": 1401,
          "line_end": 1417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"de\", \"German\"),\n            (\"fr\", \"French\"),\n        ],\n    )"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1429,
          "line_end": 1431,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0271,
          "ai_signals": []
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 1433,
          "line_end": 1447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1437,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1440,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 1449,
          "line_end": 1467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1453,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1456,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_page_specific_permissions",
          "type": "function_definition",
          "line_start": 1469,
          "line_end": 1516,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1473,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1476,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1469,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_with_page_specific_permissions is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2458,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 65,
        "avg_function_length": 20.6,
        "function_length_stddev": 20.22,
        "import_count": 21,
        "export_count": 0,
        "comment_lines": 86,
        "code_lines": 1431,
        "comment_ratio": 0.0567,
        "comment_what_ratio": 0.1169,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 118,
        "ai_smell_density": 0.08246,
        "structural_uniformity": 0.0185,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.18,
        "mechanical": 75.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_views_generic.py",
      "language": "python",
      "line_count": 141,
      "token_estimate": 1375,
      "functions": [
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_non_integer_primary_key",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 18,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 22,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4306,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_non_integer_primary_key",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 37,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4306,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_get_create_view",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 50,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3306,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_post_create_view",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_non_integer_primary_key",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_non_url_safe_primary_key",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_unquote_sensitive_primary_key",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_using_quote_in_edit_url",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 104,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 107,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4306,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_using_quote_in_delete_url",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 112,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 115,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4306,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_with_non_integer_primary_key",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_with_non_url_safe_primary_key",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        },
        {
          "name": "test_with_unquote_sensitive_primary_key",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0806,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 5.71,
        "function_length_stddev": 3.41,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 141,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.48,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.056738,
        "structural_uniformity": 0.4032,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.82,
        "mechanical": 84.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\fields.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 344,
      "functions": [
        {
          "name": "register_display_class",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9,
        "function_length_stddev": 12.12,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 33,
        "comment_ratio": 0.1951,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.33,
        "mechanical": 97.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\__init__.py",
      "language": "python",
      "line_count": 190,
      "token_estimate": 1580,
      "functions": [
        {
          "name": "display_custom_404",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0133,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 22,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 175,
        "comment_ratio": 0.0789,
        "comment_what_ratio": 0.0667,
        "naming_avg_length": 8.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\utils.py",
      "language": "python",
      "line_count": 112,
      "token_estimate": 901,
      "functions": [
        {
          "name": "get_admin_base_url",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "get_valid_next_url_from_request",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "get_latest_str",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "get_user_display_name",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 60,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 65,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "set_query_params",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "get_keyboard_key_labels_from_request",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 87,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 90,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 92,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 96,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 97,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 97,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 99,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 111,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 15.33,
        "function_length_stddev": 8.21,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 84,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 6.91,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.119048,
        "structural_uniformity": 0.4643,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.73,
        "mechanical": 69.73,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\chooser.py",
      "language": "python",
      "line_count": 836,
      "token_estimate": 7698,
      "functions": [
        {
          "name": "shared_context",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "page_models_from_string",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 49,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3189,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "can_choose_page",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 7,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 91,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 60,
              "description": "Function is 41 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 30 dynamic threshold)",
                "impact": "Function can_choose_page is 41 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.198,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 108,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 112,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_row_classname",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 142,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 155,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 185,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 190,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 191,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 196,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 197,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 200,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 200,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 201,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 201,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 207,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 207,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_object_list",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "filter_object_list",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 221,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2606,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 170,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 246,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 291,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 291,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 357,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 373,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 235,
              "description": "Function is 170 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 170 lines (> 30 dynamic threshold)",
                "impact": "Function get is 170 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1508,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 408,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 416,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 419,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 420,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 425,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 426,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 429,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 429,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 435,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 435,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 448,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 456,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 464,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 472,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 479,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 484,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 440,
              "description": "Function is 55 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 30 dynamic threshold)",
                "impact": "Function get is 55 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_chosen_response",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_initial_data",
          "type": "function_definition",
          "line_start": 529,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_url_from_field_value",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_result_data",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 549,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 551,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 553,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 566,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 559,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_form_response",
          "type": "function_definition",
          "line_start": 568,
          "line_end": 580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "render_chosen_response",
          "type": "function_definition",
          "line_start": 582,
          "line_end": 589,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 604,
          "line_end": 744,
          "metrics": {
            "cyclomatic_complexity": 14,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 141,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 608,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 613,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 639,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 639,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 640,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 640,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 641,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 641,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 643,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 643,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 653,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 656,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 656,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 656,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 657,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 657,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 659,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 659,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 661,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 661,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 664,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 669,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 669,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 669,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 670,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 670,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 672,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 672,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 674,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 674,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 678,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 681,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 604,
              "description": "Function is 141 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 141 lines (> 15 dynamic threshold)",
                "impact": "Function post is 141 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_url_from_field_value",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_initial_data",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 772,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_url_from_field_value",
          "type": "function_definition",
          "line_start": 774,
          "line_end": 775,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_result_data",
          "type": "function_definition",
          "line_start": 777,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 810,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 803,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3773,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "parse_email_link",
          "type": "function_definition",
          "line_start": 812,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        },
        {
          "name": "get_url_from_field_value",
          "type": "function_definition",
          "line_start": 833,
          "line_end": 835,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0273,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 36,
        "avg_function_length": 19.28,
        "function_length_stddev": 35.67,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 74,
        "code_lines": 762,
        "comment_ratio": 0.0885,
        "comment_what_ratio": 0.1364,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 81,
        "ai_smell_density": 0.106299,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 67.49,
        "mechanical": 67.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\history.py",
      "language": "python",
      "line_count": 620,
      "token_estimate": 5365,
      "functions": [
        {
          "name": "get_actions_for_filter",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_action_choices",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_users_queryset",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "cell_template_name",
          "type": "decorated_definition",
          "line_start": 91,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_status",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_actions",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 139,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 143,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 156,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 163,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 173,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 111,
              "description": "Function is 66 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 30 dynamic threshold)",
                "impact": "Function get_actions is 66 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 213,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 218,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 229,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 229,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 230,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 230,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_base_object_queryset",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 248,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 263,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 264,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 269,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 273,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_history_url",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_history_results_url",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "user_can_unschedule",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "verbose_name_plural",
          "type": "decorated_definition",
          "line_start": 300,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "_annotate_queryset",
          "type": "function_definition",
          "line_start": 314,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 318,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 318,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "index_url",
          "type": "decorated_definition",
          "line_start": 340,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "edit_url",
          "type": "decorated_definition",
          "line_start": 345,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 350,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 387,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 368,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 376,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 382,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 383,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 389,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "index_url",
          "type": "decorated_definition",
          "line_start": 420,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "edit_url",
          "type": "decorated_definition",
          "line_start": 425,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "workflow_history_url",
          "type": "decorated_definition",
          "line_start": 430,
          "line_end": 435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 437,
          "line_end": 467,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 443,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 450,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 457,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 463,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 464,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 469,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 472,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "workflow_state",
          "type": "decorated_definition",
          "line_start": 485,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "revisions",
          "type": "decorated_definition",
          "line_start": 493,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "tasks",
          "type": "decorated_definition",
          "line_start": 512,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "task_states_by_revision",
          "type": "decorated_definition",
          "line_start": 516,
          "line_end": 550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 529,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "timeline",
          "type": "decorated_definition",
          "line_start": 552,
          "line_end": 605,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 584,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 593,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 593,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 552,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function timeline is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2968,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 607,
          "line_end": 619,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 46,
        "avg_function_length": 10.35,
        "function_length_stddev": 13.36,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 24,
        "code_lines": 596,
        "comment_ratio": 0.0387,
        "comment_what_ratio": 0.1875,
        "naming_avg_length": 8.53,
        "debug_artifacts": [],
        "ai_smell_count": 33,
        "ai_smell_density": 0.055369,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.78,
        "mechanical": 83.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\usage.py",
      "language": "python",
      "line_count": 149,
      "token_estimate": 1271,
      "functions": [
        {
          "name": "get_link_attrs",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "describe_on_delete",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 61,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 69,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 75,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 76,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 81,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 88,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3359,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 98,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 103,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 109,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 117,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_table",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 129,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 138,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 8.38,
        "function_length_stddev": 9.21,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 146,
        "comment_ratio": 0.0201,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.78,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.082192,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.72,
        "mechanical": 76.72,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\delete.py",
      "language": "python",
      "line_count": 80,
      "token_estimate": 819,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0741,
          "ai_signals": []
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0741,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0741,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0741,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 52,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4241,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0741,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 67,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3433,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 7.86,
        "function_length_stddev": 4.95,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 76,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.026316,
        "structural_uniformity": 0.3703,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.85,
        "mechanical": 91.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\create.py",
      "language": "python",
      "line_count": 573,
      "token_estimate": 5145,
      "functions": [
        {
          "name": "add_subpage",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 61,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3541,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 119,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 82,
              "description": "Function is 79 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 30 dynamic threshold)",
                "impact": "Function dispatch is 79 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1245,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "action_name_and_method",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "action_name",
          "type": "decorated_definition",
          "line_start": 195,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "action_method",
          "type": "decorated_definition",
          "line_start": 199,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_edit_message_button",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_view_draft_message_button",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_view_live_message_button",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "set_default_privacy_setting",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "save_action",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 256,
              "description": "Function is 54 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 30 dynamic threshold)",
                "impact": "Function save_action is 54 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1007,
          "ai_signals": []
        },
        {
          "name": "publish_action",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 311,
              "description": "Function is 55 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 30 dynamic threshold)",
                "impact": "Function publish_action is 55 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "submit_action",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 406,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 367,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function submit_action is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1234,
          "ai_signals": []
        },
        {
          "name": "redirect_away",
          "type": "function_definition",
          "line_start": 408,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "redirect_and_remain",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 425,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2692,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_preview_url",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 455,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 461,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0359,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 488,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 488,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function get_context_data is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1192,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 540,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 559,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 531,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function get_translations is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2859,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 24,
        "avg_function_length": 20.92,
        "function_length_stddev": 21.41,
        "import_count": 24,
        "export_count": 0,
        "comment_lines": 39,
        "code_lines": 534,
        "comment_ratio": 0.0681,
        "comment_what_ratio": 0.1795,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.026217,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.94,
        "mechanical": 84.94,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\preview.py",
      "language": "python",
      "line_count": 119,
      "token_estimate": 1089,
      "functions": [
        {
          "name": "view_draft",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3948,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": []
        },
        {
          "name": "content_type",
          "type": "decorated_definition",
          "line_start": 70,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "parent_object_id",
          "type": "decorated_definition",
          "line_start": 81,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 13.57,
        "function_length_stddev": 9.29,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 104,
        "comment_ratio": 0.1261,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.009615,
        "structural_uniformity": 0.3155,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.53,
        "mechanical": 91.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\aging_pages.py",
      "language": "python",
      "line_count": 116,
      "token_estimate": 1127,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 56,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 56,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4613,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_id_to_python",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1113,
          "ai_signals": []
        },
        {
          "name": "add_last_publisher_name_to_page",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 76,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2955,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4613,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 111,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 111,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4613,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 11.8,
        "function_length_stddev": 7.26,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 110,
        "comment_ratio": 0.0517,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 10.06,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.072727,
        "structural_uniformity": 0.3848,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.48,
        "mechanical": 78.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\viewsets\\__init__.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 369,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0653,
          "ai_signals": []
        },
        {
          "name": "populate",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 15,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4153,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.357,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 42,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4153,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 10,
        "function_length_stddev": 6.73,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 52,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.096154,
        "structural_uniformity": 0.3267,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.34,
        "mechanical": 66.34,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\boolean_radio_select.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 255,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1615,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "format_value",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 28,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5115,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1615,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9,
        "function_length_stddev": 1.73,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 38,
        "comment_ratio": 0.0732,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.74,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.026316,
        "structural_uniformity": 0.8075,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.42,
        "mechanical": 92.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\workflows.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 225,
      "functions": [
        {
          "name": "render_js_init",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0303,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 27,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 28,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5,
        "function_length_stddev": 4.24,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 31,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.22,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.064516,
        "structural_uniformity": 0.1515,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.87,
        "mechanical": 83.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\serializers.py",
      "language": "python",
      "line_count": 420,
      "token_estimate": 3047,
      "functions": [
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 47,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 47,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 90,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 312,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 317,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 334,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 301,
              "description": "Function is 50 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 30 dynamic threshold)",
                "impact": "Function to_representation is 50 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.28,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "build_property_field",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "build_relational_field",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "build_relational_field",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_serializer_class",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 7.48,
        "function_length_stddev": 10.38,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 151,
        "code_lines": 269,
        "comment_ratio": 0.3595,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.02974,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.84,
        "mechanical": 89.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\utils.py",
      "language": "python",
      "line_count": 271,
      "token_estimate": 2108,
      "functions": [
        {
          "name": "get_base_url",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_full_url",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_object_detail_url",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "page_models_from_string",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 46,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2917,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "parse_fields_parameter",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 193,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 61,
              "description": "Function is 193 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 193 lines (> 37 dynamic threshold)",
                "impact": "Function parse_fields_parameter is 193 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0181,
          "ai_signals": []
        },
        {
          "name": "parse_boolean",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 40.5,
        "function_length_stddev": 74.83,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 61,
        "code_lines": 210,
        "comment_ratio": 0.2251,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.009524,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.64,
        "mechanical": 81.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\field_block.py",
      "language": "python",
      "line_count": 1072,
      "token_estimate": 8779,
      "functions": [
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 34,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 35,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 35,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_for_form",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 57,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 59,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 62,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 63,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "required",
          "type": "decorated_definition",
          "line_start": 80,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 125,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 104,
              "description": "Function is 41 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 30 dynamic threshold)",
                "impact": "Function js_args is 41 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.274,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 146,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 150,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 169,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 170,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3513,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 8,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 208,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 9,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 9,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 344,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 373,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2679,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 378,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 413,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 443,
          "line_end": 451,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 453,
          "line_end": 457,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 464,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 8,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 502,
              "description": "Function is 54 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 54 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0827,
          "ai_signals": []
        },
        {
          "name": "_get_callable_choices",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 579,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 582,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 557,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function _get_callable_choices is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        },
        {
          "name": "normalize_choice",
          "type": "function_definition",
          "line_start": 604,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 609,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 609,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 615,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 615,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 616,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 618,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 618,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_field",
          "type": "function_definition",
          "line_start": 629,
          "line_end": 630,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "_get_callable_choices",
          "type": "function_definition",
          "line_start": 632,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 641,
          "line_end": 643,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 645,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 656,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 658,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 663,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 666,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_field",
          "type": "function_definition",
          "line_start": 676,
          "line_end": 677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "_get_callable_choices",
          "type": "function_definition",
          "line_start": 679,
          "line_end": 681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 683,
          "line_end": 688,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 696,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 698,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 715,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 717,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 723,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 726,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 737,
          "line_end": 766,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 9,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 768,
          "line_end": 771,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 773,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 783,
          "line_end": 790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "value_for_form",
          "type": "function_definition",
          "line_start": 792,
          "line_end": 795,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 797,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 806,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 808,
          "line_end": 810,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 817,
          "line_end": 834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_default",
          "type": "function_definition",
          "line_start": 836,
          "line_end": 837,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 839,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 842,
          "line_end": 843,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 845,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_for_form",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 862,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "model_class",
          "type": "decorated_definition",
          "line_start": 870,
          "line_end": 872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 874,
          "line_end": 882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 884,
          "line_end": 892,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 894,
          "line_end": 913,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 904,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 911,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 915,
          "line_end": 920,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 922,
          "line_end": 930,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 932,
          "line_end": 933,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 935,
          "line_end": 945,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 947,
          "line_end": 949,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 959,
          "line_end": 977,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "target_model",
          "type": "decorated_definition",
          "line_start": 979,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 980,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 980,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "target_models",
          "type": "decorated_definition",
          "line_start": 992,
          "line_end": 999,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 996,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "widget",
          "type": "decorated_definition",
          "line_start": 1001,
          "line_end": 1007,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 1009,
          "line_end": 1019,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 1021,
          "line_end": 1025,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0179,
          "ai_signals": []
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 1027,
          "line_end": 1040,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1033,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1035,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3679,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 87,
        "avg_function_length": 9.3,
        "function_length_stddev": 9.23,
        "import_count": 26,
        "export_count": 0,
        "comment_lines": 135,
        "code_lines": 937,
        "comment_ratio": 0.1259,
        "comment_what_ratio": 0.0824,
        "naming_avg_length": 7.13,
        "debug_artifacts": [],
        "ai_smell_count": 37,
        "ai_smell_density": 0.039488,
        "structural_uniformity": 0.0072,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.07,
        "mechanical": 87.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\struct_block.py",
      "language": "python",
      "line_count": 640,
      "token_estimate": 6032,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 56,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1576,
          "ai_signals": []
        },
        {
          "name": "as_json_data",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 69,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 8,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 88,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 89,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 95,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 95,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 111,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 112,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 130,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 136,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 146,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 86,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function __init__ is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "unique_children_and_settings",
          "type": "decorated_definition",
          "line_start": 150,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 158,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 166,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_sorted_block_names",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 179,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3243,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 197,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3018,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "telepath_pack",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 201,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "render_as_block",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "bound_blocks",
          "type": "decorated_definition",
          "line_start": 217,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__reduce__",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "render_form",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 249,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1848,
          "ai_signals": []
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 264,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_default",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 287,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 292,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 298,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 300,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 306,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 312,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 315,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 324,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 328,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 351,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 358,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 370,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 373,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 346,
              "description": "Function is 40 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 30 dynamic threshold)",
                "impact": "Function bulk_to_python is 40 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_to_struct_value",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 410,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 412,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 419,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 424,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 432,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_xml_delimiters",
              "severity": "low",
              "line": 437,
              "description": "Long user content without XML delimiters \u2014 Claude performs better with structured input for extraction tasks",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 449,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2168,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 460,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 474,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 487,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_check_form_layout",
          "type": "function_definition",
          "line_start": 494,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 511,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "render_form_template",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 528,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2826,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "get_form_context",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 535,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 541,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 558,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_layout",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 571,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": []
        },
        {
          "name": "_has_default",
          "type": "decorated_definition",
          "line_start": 573,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0326,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 598,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 600,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 604,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 621,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 622,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 630,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 634,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3826,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 43,
        "avg_function_length": 11.95,
        "function_length_stddev": 11.6,
        "import_count": 15,
        "export_count": 5,
        "comment_lines": 124,
        "code_lines": 516,
        "comment_ratio": 0.1938,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 7.11,
        "debug_artifacts": [],
        "ai_smell_count": 47,
        "ai_smell_density": 0.091085,
        "structural_uniformity": 0.0297,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.16,
        "mechanical": 73.16,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\migrations\\0002_add_verbose_names.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 130,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.13,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\tests\\test_forms.py",
      "language": "python",
      "line_count": 418,
      "token_estimate": 3854,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 113,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 43,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 57,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 71,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 78,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 85,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 93,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 118,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 125,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 113 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 113 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 113 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5045,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 133,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_fields is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2068,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_unsaved_fields_in_form_builder_formfields",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 208,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 212,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 217,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 221,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 224,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 225,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5045,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_newline_value_separation_in_choices",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 245,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 246,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (0.74)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_newline_value_separation_in_default_value",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 269,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3067,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_custom_widget",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 279,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_widget is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2129,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 358,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3295,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_using_custom_form_builder",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1545,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_adding_custom_field",
          "type": "function_definition",
          "line_start": 372,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 377,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 385,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5045,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_unsaved_fields_in_form_builder_formfields_with_clean_name_override",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 397,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 401,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 406,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 410,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5045,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 38.8,
        "function_length_stddev": 32.1,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 387,
        "comment_ratio": 0.0742,
        "comment_what_ratio": 0.6,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 32,
        "ai_smell_density": 0.082687,
        "structural_uniformity": 0.1726,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.14,
        "mechanical": 68.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\http.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 440,
      "functions": [
        {
          "name": "get_method",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 48,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 54,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 61,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4838,
          "ai_signals": [
            "High anti-pattern density (0.81)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 14.67,
        "function_length_stddev": 19.4,
        "import_count": 6,
        "export_count": 2,
        "comment_lines": 1,
        "code_lines": 64,
        "comment_ratio": 0.0154,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 7.1,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.046875,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.05,
        "mechanical": 85.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\legacy\\sitemiddleware\\__init__.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 116,
      "functions": [
        {
          "name": "process_request",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 12,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.35,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.0,
        "mechanical": 97.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0006_redirect_increase_max_length.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 120,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_tmp_storages.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 143,
      "functions": [
        {
          "name": "test_cache_storage_save_and_remove",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 13,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 19,
        "comment_ratio": 0.0952,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.1,
        "mechanical": 99.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\routable_page\\models.py",
      "language": "python",
      "line_count": 229,
      "token_estimate": 1901,
      "functions": [
        {
          "name": "_path",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": []
        },
        {
          "name": "index_route",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": [],
          "decorators": [
            "path(\"\")"
          ]
        },
        {
          "name": "get_subpage_urls",
          "type": "decorated_definition",
          "line_start": 65,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 72,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 74,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4281,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_resolver",
          "type": "decorated_definition",
          "line_start": 86,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 96,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_check_path_with_regex",
          "type": "decorated_definition",
          "line_start": 102,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 106,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2239,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "reverse_subpage",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": []
        },
        {
          "name": "resolve_subpage",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": []
        },
        {
          "name": "route",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": []
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 166,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 166,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 166,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 166,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 172,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 172,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 172,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 172,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4281,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 177,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 177,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 177,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 177,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 175,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function render is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4281,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "serve_preview",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 216,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 216,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4281,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 14.5,
        "function_length_stddev": 10.45,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 60,
        "code_lines": 169,
        "comment_ratio": 0.262,
        "comment_what_ratio": 0.1111,
        "naming_avg_length": 6.94,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.106509,
        "structural_uniformity": 0.2794,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.15,
        "mechanical": 71.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0006_reset_query_sequence.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 235,
      "functions": [
        {
          "name": "reset_search_promotion_sequence",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 12,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 12,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 13,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 13,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 18,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 13,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 27,
        "comment_ratio": 0.1562,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.78,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.185185,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.6,
        "mechanical": 68.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\apps.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 46,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\wagtail_hooks.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 60,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 8,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 13,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\tests\\test_forms.py",
      "language": "python",
      "line_count": 141,
      "token_estimate": 1372,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1131,
          "ai_signals": []
        },
        {
          "name": "test_include_subtree",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4631,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locales_queryset",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1131,
          "ai_signals": []
        },
        {
          "name": "test_select_all",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1131,
          "ai_signals": []
        },
        {
          "name": "test_locale_disabled",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 96,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 97,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 100,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4631,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_help_text",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1131,
          "ai_signals": []
        },
        {
          "name": "test_hide_submit",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1131,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 16,
        "function_length_stddev": 6.95,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 38,
        "code_lines": 103,
        "comment_ratio": 0.2695,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.058252,
        "structural_uniformity": 0.5655,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.64,
        "mechanical": 83.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\styleguide\\views.py",
      "language": "python",
      "line_count": 173,
      "token_estimate": 1616,
      "functions": [
        {
          "name": "get_chooser_modal_url",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0372,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0372,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 95,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0372,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0372,
          "ai_signals": []
        },
        {
          "name": "get_icons",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 153,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 160,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 160,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 162,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 162,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3872,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 15.6,
        "function_length_stddev": 12.7,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 159,
        "comment_ratio": 0.0809,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.037736,
        "structural_uniformity": 0.1859,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.29,
        "mechanical": 87.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\table_block\\tests.py",
      "language": "python",
      "line_count": 727,
      "token_estimate": 6510,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_table_block_render",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 48,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2925,
          "ai_signals": []
        },
        {
          "name": "test_table_block_alignment_render",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 80,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2689,
          "ai_signals": []
        },
        {
          "name": "test_table_block_classname_escaping",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 124,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 96,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_table_block_classname_escaping is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3295,
          "ai_signals": []
        },
        {
          "name": "test_render_empty_table",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 144,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.322,
          "ai_signals": []
        },
        {
          "name": "test_do_not_render_html_by_default",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 188,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2879,
          "ai_signals": []
        },
        {
          "name": "test_does_render_html_if_allowed",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 218,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2835,
          "ai_signals": []
        },
        {
          "name": "test_row_headers",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 243,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3087,
          "ai_signals": []
        },
        {
          "name": "test_column_headers",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 270,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2975,
          "ai_signals": []
        },
        {
          "name": "test_row_and_column_headers",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 299,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2879,
          "ai_signals": []
        },
        {
          "name": "test_no_headers",
          "type": "function_definition",
          "line_start": 302,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 326,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2975,
          "ai_signals": []
        },
        {
          "name": "test_value_for_and_from_form",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_is_html_renderer",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 361,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content_for_null_block",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_render_with_extra_context",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 406,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3471,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_table_block_caption_render",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 425,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2879,
          "ai_signals": []
        },
        {
          "name": "test_empty_table_block_is_not_rendered",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 445,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.481,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_merge_cells_render",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 473,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2689,
          "ai_signals": []
        },
        {
          "name": "test_empty_table_block_to_python",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_default_table_options",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_table_options_language",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_table_options_context_menu",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 584,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_table_options_others",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 603,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 607,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 614,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 618,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5129,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 627,
          "line_end": 663,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 665,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 674,
          "line_end": 681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 686,
          "line_end": 705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_page_view",
          "type": "decorated_definition",
          "line_start": 707,
          "line_end": 726,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1629,
          "ai_signals": [],
          "decorators": [
            "unittest.expectedFailure"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 31,
        "avg_function_length": 21.74,
        "function_length_stddev": 9.01,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 564,
        "code_lines": 163,
        "comment_ratio": 0.7758,
        "comment_what_ratio": 0.2286,
        "naming_avg_length": 7.45,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.110429,
        "structural_uniformity": 0.5857,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.38,
        "mechanical": 71.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\admin_urls.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 325,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 37,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.87,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\blocks.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 50,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0005_alter_uploaded_by_user_on_delete_action.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 177,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0012_uploadeddocument.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 341,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 45,
        "comment_ratio": 0.0217,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\rich_text\\editor_html.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 265,
      "functions": [
        {
          "name": "get_db_attributes",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0114,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 26,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 26,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 29,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3614,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9,
        "function_length_stddev": 8.49,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 31,
        "comment_ratio": 0.1389,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.32,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.16129,
        "structural_uniformity": 0.0572,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_bulk_actions\\test_bulk_add_to_collection.py",
      "language": "python",
      "line_count": 169,
      "token_estimate": 1479,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "cohere_document_no_id",
              "severity": "medium",
              "line": 17,
              "description": "RAG documents without unique IDs \u2014 can't track citations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_add_to_collection_with_limited_permissions",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 39,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 47,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 53,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 61,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 69,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_to_collection",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 82,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "cohere_document_no_id",
              "severity": "medium",
              "line": 92,
              "description": "RAG documents without unique IDs \u2014 can't track citations",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2773,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_add_all_to_collection_with_limited_permissions",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 118,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 134,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 137,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 143,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 145,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 108,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_all_to_collection_with_limited_permissions is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 153,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_all_to_collection",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 164,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 166,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4431,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 18.38,
        "function_length_stddev": 11.66,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 159,
        "comment_ratio": 0.0592,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.132075,
        "structural_uniformity": 0.3654,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.42,
        "mechanical": 68.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_search.py",
      "language": "python",
      "line_count": 135,
      "token_estimate": 1241,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 26,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4536,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "add_document",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1619,
          "ai_signals": []
        },
        {
          "name": "edit_document",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1619,
          "ai_signals": []
        },
        {
          "name": "test_issue_613_on_add",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 80,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 102,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 102,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5119,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_issue_613_on_edit",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 130,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 130,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4212,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 23,
        "function_length_stddev": 7.04,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 109,
        "comment_ratio": 0.1926,
        "comment_what_ratio": 0.1154,
        "naming_avg_length": 7.28,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.055046,
        "structural_uniformity": 0.6941,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.04,
        "mechanical": 80.04,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\bulk_actions\\add_tags.py",
      "language": "python",
      "line_count": 45,
      "token_estimate": 386,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0862,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0862,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 29,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 34,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 36,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4362,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 39,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4362,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.25,
        "function_length_stddev": 2.99,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 45,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.83,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.4312,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.33,
        "mechanical": 83.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\wagtail_hooks.py",
      "language": "python",
      "line_count": 217,
      "token_estimate": 1837,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "construct_admin_api",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 46,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 46,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3578,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"construct_admin_api\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": []
        },
        {
          "name": "register_documents_menu_item",
          "type": "decorated_definition",
          "line_start": 56,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "register_document_feature",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 83,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1328,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": []
        },
        {
          "name": "add_documents_summary_item",
          "type": "decorated_definition",
          "line_start": 117,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_homepage_summary_items\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": []
        },
        {
          "name": "register_documents_search_area",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_search_area\")"
          ]
        },
        {
          "name": "register_document_permissions_panel",
          "type": "decorated_definition",
          "line_start": 140,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_group_permission_panel\")"
          ]
        },
        {
          "name": "describe_collection_docs",
          "type": "decorated_definition",
          "line_start": 145,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 147,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 147,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3578,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"describe_collection_contents\")"
          ]
        },
        {
          "name": "check_view_restrictions",
          "type": "decorated_definition",
          "line_start": 160,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 160,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 160,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 169,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 160,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function check_view_restrictions is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3578,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"before_serve_document\")"
          ]
        },
        {
          "name": "register_document_chooser_viewset",
          "type": "decorated_definition",
          "line_start": 214,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0078,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 9.79,
        "function_length_stddev": 10.97,
        "import_count": 25,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 210,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.47,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.042857,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.29,
        "mechanical": 89.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\base.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 41,
      "functions": [
        {
          "name": "accept",
          "type": "function_definition",
          "line_start": 2,
          "line_end": 3,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 6,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.08,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0002_add_verbose_names.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 73,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.27,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\wagtail_hooks.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 482,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "register_embed_feature",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 43,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1258,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 20.5,
        "function_length_stddev": 21.92,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 48,
        "comment_ratio": 0.1273,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 9.02,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.020833,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.64,
        "mechanical": 91.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\apps.py",
      "language": "python",
      "line_count": 49,
      "token_estimate": 392,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 25,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 25,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 48,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 48,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 48,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 48,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 48,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 48,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 48,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4833,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 5,
              "description": "Unused import: from . import checks, get_image_model",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'checks' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from . import checks, get_image_model",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 34,
        "function_length_stddev": 0.0,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 46,
        "comment_ratio": 0.0612,
        "comment_what_ratio": 0.6667,
        "naming_avg_length": 9.9,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.195652,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 67.8,
        "mechanical": 67.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\forms.py",
      "language": "python",
      "line_count": 259,
      "token_estimate": 2261,
      "functions": [
        {
          "name": "formfield_for_dbfield",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 28,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 33,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5061,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5061,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        },
        {
          "name": "clean_tags",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        },
        {
          "name": "get_image_base_form",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        },
        {
          "name": "get_image_form",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        },
        {
          "name": "get_image_multi_form",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        },
        {
          "name": "clean_alt_text",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1561,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.25,
        "function_length_stddev": 7.29,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 231,
        "comment_ratio": 0.1081,
        "comment_what_ratio": 0.2917,
        "naming_avg_length": 7.12,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.017316,
        "structural_uniformity": 0.4888,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.27,
        "mechanical": 88.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0002_initial_data.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 540,
      "functions": [
        {
          "name": "add_image_permissions_to_admin_groups",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 15,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 20,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 25,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5343,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_image_permissions",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 39,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 39,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 43,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 47,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5343,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 22,
        "function_length_stddev": 12.73,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 60,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 9.31,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.283333,
        "structural_uniformity": 0.4215,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.65,
        "mechanical": 68.65,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0010_change_on_delete_behaviour.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 165,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0018_remove_rendition_filter.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 88,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0026_delete_uploadedimage.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 81,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.43,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\rich_text\\editor_html.py",
      "language": "python",
      "line_count": 49,
      "token_estimate": 392,
      "functions": [
        {
          "name": "get_db_attributes",
          "type": "decorated_definition",
          "line_start": 18,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 22,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4602,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Suspiciously uniform function lengths (0.84)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 37,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 37,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5186,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.84)"
          ],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13.5,
        "function_length_stddev": 2.12,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 31,
        "comment_ratio": 0.3673,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.13,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.096774,
        "structural_uniformity": 0.8429,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.76,
        "mechanical": 74.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_management_commands.py",
      "language": "python",
      "line_count": 141,
      "token_estimate": 1428,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 18,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 28,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 29,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4812,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "delete_renditions",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 41,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 41 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 37,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 41,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 41,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4812,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "run_command",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": []
        },
        {
          "name": "test_progress_bar",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 56,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 58,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4494,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_exits_early_for_no_renditions",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": []
        },
        {
          "name": "test_image_renditions",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": []
        },
        {
          "name": "test_image_renditions_with_purge_only",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": []
        },
        {
          "name": "test_image_renditions_with_cache",
          "type": "decorated_definition",
          "line_start": 124,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\"default\": {\"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\"}}\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.5,
        "function_length_stddev": 4.99,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 133,
        "comment_ratio": 0.0567,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.34,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.06015,
        "structural_uniformity": 0.6562,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.86,
        "mechanical": 81.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\tests.py",
      "language": "python",
      "line_count": 967,
      "token_estimate": 8805,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "render_image_tag",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_image_tag",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 67,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 68,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_tag_none",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 72,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_tag_wrong_type",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "render_image_tag_as",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_image_tag_attrs",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 89,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 92,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 93,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_image_tag_with_extra_attributes",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_image_tag_with_extra_attributes",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 105,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 110,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 111,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_image_tag_with_filters",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_image_tag_with_filters",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 124,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 125,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 126,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_tag_with_chained_filters",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 129,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 130,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 131,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_specs_must_match_allowed_pattern",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_context_may_only_contain_one_argument",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_no_image_filter_provided",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_no_image_filter_provided_when_using_as",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_no_image_filter_provided_but_attributes_provided",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "render_image_url_tag",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_image_url",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 186,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 186,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 186,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_url_custom_view",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 193,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 194,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 194,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_url_no_imageserve_view_added",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 204,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 204,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 205,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 205,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 208,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 208,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_tag_with_missing_image",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 228,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_rich_text_with_missing_image",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 239,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 247,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_editor_attributes",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 260,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4896,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_image_to_editor_html",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 267,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 269,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 271,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_to_editor_html_with_quoting",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 277,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 281,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 283,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_to_html_no_classnames",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 290,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 292,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_to_html_with_quoting",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 301,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 303,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_image_format",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_signature_generation",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_signature_verification",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_signature_changes_on_image_id",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_signature_changes_on_filter_spec",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 355,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 355,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 362,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 366,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_svg",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 377,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 377,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 383,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 387,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_avif",
          "type": "decorated_definition",
          "line_start": 390,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 399,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 399,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 405,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 407,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_FORMAT_CONVERSIONS={\"avif\": \"avif\"})"
          ]
        },
        {
          "name": "test_get_with_extra_component",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 431,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 420,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 420,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 428,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 430,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_too_many_extra_components",
          "type": "function_definition",
          "line_start": 433,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 443,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 443,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_serve_action",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 451,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 451,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 455,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 455,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 462,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 466,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_redirect_action",
          "type": "function_definition",
          "line_start": 469,
          "line_end": 489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 473,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 473,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5048,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_init_with_unknown_action_raises_error",
          "type": "function_definition",
          "line_start": 491,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_get_with_custom_key",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 505,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 505,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 514,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_custom_key_using_default_key",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 529,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 529,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_invalid_signature",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 548,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 548,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_invalid_filter_spec",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 570,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 570,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4896,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_missing_source_image_file",
          "type": "function_definition",
          "line_start": 578,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 592,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 592,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_cache_control",
          "type": "function_definition",
          "line_start": 599,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 603,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 603,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 611,
          "line_end": 615,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_sendfile_nobackend",
          "type": "decorated_definition",
          "line_start": 617,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 629,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4048,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "override_settings(SENDFILE_BACKEND=\"sendfile.backends.development\")",
            "unittest.skipIf(not sendfile_mod, \"Missing django-sendfile app.\")"
          ]
        },
        {
          "name": "test_sendfile_dummy_backend",
          "type": "decorated_definition",
          "line_start": 633,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 644,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4214,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ],
          "decorators": [
            "override_settings(SENDFILE_BACKEND=\"sendfile.backends.development\")"
          ]
        },
        {
          "name": "test_init",
          "type": "function_definition",
          "line_start": 650,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_equality",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_getitem",
          "type": "function_definition",
          "line_start": 661,
          "line_end": 667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_as_tuple",
          "type": "function_definition",
          "line_start": 669,
          "line_end": 671,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_size",
          "type": "function_definition",
          "line_start": 673,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_set_size_with_tuple",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_set_size_with_vector",
          "type": "function_definition",
          "line_start": 685,
          "line_end": 688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_centroid",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 697,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_set_centroid_with_tuple",
          "type": "function_definition",
          "line_start": 699,
          "line_end": 702,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_set_centroid_with_vector",
          "type": "function_definition",
          "line_start": 704,
          "line_end": 707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_repr",
          "type": "function_definition",
          "line_start": 709,
          "line_end": 713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_from_point",
          "type": "function_definition",
          "line_start": 715,
          "line_end": 717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_admin_form_fields_attribute",
          "type": "function_definition",
          "line_start": 739,
          "line_end": 757,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_file_field",
          "type": "function_definition",
          "line_start": 759,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_tags_field",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 769,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_focal_point_fields",
          "type": "function_definition",
          "line_start": 771,
          "line_end": 792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_normal_filter",
          "type": "function_definition",
          "line_start": 800,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 803,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 807,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fill_filter",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 818,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_fill_filter_with_focal_point",
          "type": "function_definition",
          "line_start": 820,
          "line_end": 832,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_filter_with_pipe_gets_dotted",
          "type": "function_definition",
          "line_start": 834,
          "line_end": 846,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_upload_path",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": []
        },
        {
          "name": "test_custom_get_image_model",
          "type": "decorated_definition",
          "line_start": 869,
          "line_end": 872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 870,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 870,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 872,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 872,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "test_custom_get_image_model_string",
          "type": "decorated_definition",
          "line_start": 874,
          "line_end": 877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "test_standard_get_image_model",
          "type": "decorated_definition",
          "line_start": 879,
          "line_end": 885,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 880,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 880,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 885,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 885,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings()"
          ]
        },
        {
          "name": "test_standard_get_image_model_string",
          "type": "decorated_definition",
          "line_start": 887,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": [],
          "decorators": [
            "override_settings()"
          ]
        },
        {
          "name": "test_unknown_get_image_model",
          "type": "decorated_definition",
          "line_start": 893,
          "line_end": 900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 897,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 897,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 900,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 900,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "disconnect_signal_receiver(\n        signal=setting_changed, receiver=update_permission_policy\n    )",
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.UnknownModel\")"
          ]
        },
        {
          "name": "test_invalid_get_image_model",
          "type": "decorated_definition",
          "line_start": 902,
          "line_end": 909,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 906,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 906,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 909,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 909,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "disconnect_signal_receiver(\n        signal=setting_changed, receiver=update_permission_policy\n    )",
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"invalid-string\")"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 913,
          "line_end": 917,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1714,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_to_python_with_inmemoryfile",
          "type": "function_definition",
          "line_start": 919,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 923,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 927,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_to_python_gets_content_type_from_willow",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 937,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 933,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 937,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_to_python_with_temporary_file",
          "type": "function_definition",
          "line_start": 939,
          "line_end": 950,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 942,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 945,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mediagen_temp_file_not_cleaned",
              "severity": "medium",
              "line": 945,
              "description": "Generated media saved to temp file but never cleaned up -- disk space exhaustion in production",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 950,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_to_python_raises_error_with_invalid_image_file",
          "type": "function_definition",
          "line_start": 952,
          "line_end": 966,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 958,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4048,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 41,
              "description": "Unused import: import sendfile",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'sendfile' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import sendfile",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 85,
        "avg_function_length": 9.41,
        "function_length_stddev": 5.7,
        "import_count": 28,
        "export_count": 0,
        "comment_lines": 99,
        "code_lines": 868,
        "comment_ratio": 0.1024,
        "comment_what_ratio": 0.463,
        "naming_avg_length": 7.65,
        "debug_artifacts": [],
        "ai_smell_count": 110,
        "ai_smell_density": 0.126728,
        "structural_uniformity": 0.3942,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.62,
        "mechanical": 74.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\bulk_actions\\add_to_collection.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 532,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 51,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 5.67,
        "function_length_stddev": 3.5,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 58,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.18,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.068966,
        "structural_uniformity": 0.3819,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.76,
        "mechanical": 82.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\widgets.py",
      "language": "python",
      "line_count": 68,
      "token_estimate": 593,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_value_data_from_instance",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1167,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1167,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 43,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 47,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 48,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 49,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 61,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 62,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 7,
        "function_length_stddev": 2.92,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 68,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.14,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.102941,
        "structural_uniformity": 0.5835,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\wagtail_hooks.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 205,
      "functions": [
        {
          "name": "register_viewset",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 13,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4295,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0795,
          "ai_signals": []
        },
        {
          "name": "register_locales_menu_item",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0795,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5.33,
        "function_length_stddev": 3.21,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.54,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.03125,
        "structural_uniformity": 0.3973,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.19,
        "mechanical": 92.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\move_pages.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 213,
      "functions": [
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0781,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 28,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2531,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12,
        "function_length_stddev": 11.31,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 29,
        "comment_ratio": 0.0938,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 5.88,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.034483,
        "structural_uniformity": 0.0572,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.03,
        "mechanical": 88.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 292,
      "token_estimate": 2606,
      "functions": [
        {
          "name": "set_page_path_collation",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 14,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 282,
        "comment_ratio": 0.0342,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.3,
        "mechanical": 93.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0008_populate_latest_revision_created_at.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 165,
      "functions": [
        {
          "name": "populate_latest_revision_created_at",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 7,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3563,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.38,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.0,
        "mechanical": 64.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0016_change_page_url_path_to_text_field.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 104,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0024_alter_page_content_type_on_delete_behaviour.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 162,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0031_add_page_view_restriction_types.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 319,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 38,
        "comment_ratio": 0.0256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0039_collectionviewrestriction.py",
      "language": "python",
      "line_count": 78,
      "token_estimate": 658,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 77,
        "comment_ratio": 0.0128,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.35,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0047_add_workflow_models.py",
      "language": "python",
      "line_count": 348,
      "token_estimate": 3140,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 347,
        "comment_ratio": 0.0029,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.31,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0055_page_locale_fields.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 229,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 34,
        "comment_ratio": 0.0286,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0063_modellogentry.py",
      "language": "python",
      "line_count": 66,
      "token_estimate": 600,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 65,
        "comment_ratio": 0.0152,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0071_populate_revision_content_type.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 289,
      "functions": [
        {
          "name": "populate_revision_content_type",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3884,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "empty_revision_content_type",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3884,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7,
        "function_length_stddev": 5.66,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 37,
        "comment_ratio": 0.0263,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.51,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.189189,
        "structural_uniformity": 0.1919,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0079_rename_taskstate_page_revision.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 97,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.79,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0087_alter_grouppagepermission_unique_together_and_more.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 328,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 42,
        "comment_ratio": 0.0233,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0095_groupsitepermission.py",
      "language": "python",
      "line_count": 61,
      "token_estimate": 489,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 60,
        "comment_ratio": 0.0164,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\copying.py",
      "language": "python",
      "line_count": 114,
      "token_estimate": 977,
      "functions": [
        {
          "name": "_extract_field_data",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 5,
            "parameter_count": 2,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 16,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 7,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 7 in _extract_field_data makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 7,
              "description": "Function is 50 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 15 dynamic threshold)",
                "impact": "Function _extract_field_data is 50 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3349,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "_copy_m2m_relations",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 4,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 66,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 84,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 59,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function _copy_m2m_relations is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4249,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "_copy",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 101,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3194,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 34.33,
        "function_length_stddev": 16.01,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 95,
        "comment_ratio": 0.1667,
        "comment_what_ratio": 0.0909,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.073684,
        "structural_uniformity": 0.5337,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 47.28,
        "mechanical": 47.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\preview.py",
      "language": "python",
      "line_count": 290,
      "token_estimate": 2801,
      "functions": [
        {
          "name": "make_preview_request",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 23,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 23,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 44,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 44,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 51,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 51,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 52,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 53,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 17,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function make_preview_request is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3659,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_fallback_hostname",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 69,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2002,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "_get_dummy_headers",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 85,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 85,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 142,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 82,
              "description": "Function is 65 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 30 dynamic threshold)",
                "impact": "Function _get_dummy_headers is 65 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2313,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "_get_dummy_header_url",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": []
        },
        {
          "name": "get_full_url",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": []
        },
        {
          "name": "preview_modes",
          "type": "decorated_definition",
          "line_start": 187,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_mode",
          "type": "decorated_definition",
          "line_start": 199,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "preview_sizes",
          "type": "decorated_definition",
          "line_start": 209,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 218,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 229,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 230,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3659,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_size",
          "type": "decorated_definition",
          "line_start": 237,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_previewable",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": []
        },
        {
          "name": "serve_preview",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 250,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 250,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3659,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_preview_context",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0159,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 283,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 283,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 287,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 287,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3659,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 18.23,
        "function_length_stddev": 17.92,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 109,
        "code_lines": 181,
        "comment_ratio": 0.3759,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 7.1,
        "debug_artifacts": [],
        "ai_smell_count": 25,
        "ai_smell_density": 0.138122,
        "structural_uniformity": 0.0172,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.61,
        "mechanical": 68.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permission_policies\\base.py",
      "language": "python",
      "line_count": 430,
      "token_estimate": 4572,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 35,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 35,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 37,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 37,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "check_model",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_all_permissions_for_user",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "get_cached_permissions_for_user",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_permission",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 181,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 181,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "users_with_permission",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 184,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 184,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 200,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 200,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "users_with_permission",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 203,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 203,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "auth_model",
          "type": "decorated_definition",
          "line_start": 222,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 223,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 223,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "app_label",
          "type": "decorated_definition",
          "line_start": 226,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 227,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 228,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 230,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_content_type",
          "type": "decorated_definition",
          "line_start": 234,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 236,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 236,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_get_permission_codenames",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_get_permission_name",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 243,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 247,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_permission_objects_for_actions",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_get_users_with_any_permission_codenames_filter",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_get_users_with_any_permission_codenames",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 285,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 285,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "check_model",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 324,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 324,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 325,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 325,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 362,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 362,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 423,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 423,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 429,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 429,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 43,
        "avg_function_length": 6.88,
        "function_length_stddev": 5.31,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 171,
        "code_lines": 259,
        "comment_ratio": 0.3977,
        "comment_what_ratio": 0.1071,
        "naming_avg_length": 7.48,
        "debug_artifacts": [],
        "ai_smell_count": 34,
        "ai_smell_density": 0.131274,
        "structural_uniformity": 0.2292,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.52,
        "mechanical": 73.52,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\home\\migrations\\0002_create_homepage.py",
      "language": "python",
      "line_count": 67,
      "token_estimate": 471,
      "functions": [
        {
          "name": "create_homepage",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 14,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5024,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_homepage",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 43,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 43,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 44,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 44,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5024,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 23,
        "function_length_stddev": 16.97,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 57,
        "comment_ratio": 0.1493,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.33,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.263158,
        "structural_uniformity": 0.2621,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.1,
        "mechanical": 71.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\project_name\\settings\\production.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 117,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 11,
        "comment_ratio": 0.2667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\rich_text\\feature_registry.py",
      "language": "python",
      "line_count": 112,
      "token_estimate": 1168,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 20,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 36,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 36,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3387,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "get_default_features",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_scan_for_features",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_editor_plugin",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_editor_plugin",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 69,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_link_type",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_link_types",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_embed_type",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_embed_types",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_converter_rule",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_converter_rule",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 98,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "function_as_entity_handler",
          "type": "decorated_definition",
          "line_start": 101,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 7.08,
        "function_length_stddev": 8.02,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 82,
        "comment_ratio": 0.2679,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.073171,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.96,
        "mechanical": 78.96,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\fallback.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 16,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\opensearch2.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 258,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 19.39,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0002_add_verbose_names.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 229,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\signal_handlers.py",
      "language": "python",
      "line_count": 122,
      "token_estimate": 1001,
      "functions": [
        {
          "name": "post_save_site_signal_handler",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "post_delete_site_signal_handler",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "pre_delete_page_unpublish",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "post_delete_page_log_deletion",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "reset_locales_display_names_cache",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "disable_reference_index_auto_update",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "update_reference_index_on_save",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 75,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.359,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "remove_reference_index_on_delete",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        },
        {
          "name": "connect_reference_index_signal_handlers_for_model",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 88,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 88,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3908,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "connect_reference_index_signal_handlers",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 94,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 95,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 95,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3908,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "disconnect_reference_index_signal_handlers_for_model",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 98,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 98,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3908,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "disconnect_reference_index_signal_handlers",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 104,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 105,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 105,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3908,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0408,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 5.54,
        "function_length_stddev": 4.74,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 108,
        "comment_ratio": 0.1148,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.71,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.101852,
        "structural_uniformity": 0.1448,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.69,
        "mechanical": 72.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\permissions.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 265,
      "functions": [
        {
          "name": "get_permission_name",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 8,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_can_edit_snippet_type",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 15,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_can_access_snippets",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 25,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 25,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 25,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9.33,
        "function_length_stddev": 5.86,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 32,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.1875,
        "structural_uniformity": 0.3722,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.83,
        "mechanical": 66.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_chooser_panel.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1455,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_as_empty_field",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_js",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_target_model_autodetected",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 73,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4219,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_as_empty_field",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_render_js",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0719,
          "ai_signals": []
        },
        {
          "name": "test_target_model_autodetected",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 144,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 144,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4219,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 11.9,
        "function_length_stddev": 7.62,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 150,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.89,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.02,
        "structural_uniformity": 0.3595,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.43,
        "mechanical": 94.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_history_view.py",
      "language": "python",
      "line_count": 301,
      "token_estimate": 3124,
      "functions": [
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 31,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 31,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 32,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 38,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 38,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 39,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 47,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 47,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 63,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filters",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 72,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_should_not_show_actions_on_non_revisable_snippet",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "test_should_show_actions_on_revisable_snippet",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "test_with_live_and_draft_status",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 155,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 156,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 157,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 158,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_history_group_by_uuid_and_action",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 116,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 168,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 178,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 193,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 247,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 160,
              "description": "Function is 116 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 116 lines (> 60 dynamic threshold)",
                "impact": "Function test_history_group_by_uuid_and_action is 116 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2398,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "test_get_with_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 277,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 293,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2345,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 24.73,
        "function_length_stddev": 32.27,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 42,
        "code_lines": 259,
        "comment_ratio": 0.1395,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 6.77,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.092664,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.19,
        "mechanical": 68.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_revert_view.py",
      "language": "python",
      "line_count": 344,
      "token_estimate": 3508,
      "functions": [
        {
          "name": "revert_url",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0414,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0414,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0414,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0414,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 46,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 46,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3914,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_revert_revision",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 77,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 84,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 87,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 90,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 59,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_revert_revision is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3914,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_revert_revision_with_non_revisable_snippet",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0414,
          "ai_signals": []
        },
        {
          "name": "test_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3596,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_with_draft_state_snippet",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 124,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 125,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3502,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_get_with_previewable_snippet",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 163,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 177,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 180,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 186,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 153,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_with_previewable_snippet is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3914,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_replace_revision",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 199,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.176,
          "ai_signals": []
        },
        {
          "name": "test_replace_with_limited_permissions",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 228,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2005,
          "ai_signals": []
        },
        {
          "name": "test_replace_draft",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 255,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 269,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 269,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 247,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_replace_draft is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3393,
          "ai_signals": [
            "High anti-pattern density (0.85)"
          ]
        },
        {
          "name": "test_replace_publish",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 301,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 319,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 319,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 295,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_replace_publish is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3271,
          "ai_signals": [
            "High anti-pattern density (0.82)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 22.14,
        "function_length_stddev": 17.56,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 32,
        "code_lines": 312,
        "comment_ratio": 0.093,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 27,
        "ai_smell_density": 0.086538,
        "structural_uniformity": 0.2071,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.51,
        "mechanical": 73.51,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\views\\chooser.py",
      "language": "python",
      "line_count": 80,
      "token_estimate": 544,
      "functions": [
        {
          "name": "page_subtitle",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 29,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "widget_class",
          "type": "decorated_definition",
          "line_start": 77,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.5,
        "function_length_stddev": 3.32,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 80,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.397,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\templatetags\\wagtailcore_tags.py",
      "language": "python",
      "line_count": 217,
      "token_estimate": 1711,
      "functions": [
        {
          "name": "pageurl",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "fullpageurl",
          "type": "decorated_definition",
          "line_start": 33,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "slugurl",
          "type": "decorated_definition",
          "line_start": 51,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 65,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2218,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "wagtail_version",
          "type": "decorated_definition",
          "line_start": 81,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "wagtail_documentation_path",
          "type": "decorated_definition",
          "line_start": 86,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "wagtail_release_notes_path",
          "type": "decorated_definition",
          "line_start": 95,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "wagtail_feature_release_whats_new_link",
          "type": "decorated_definition",
          "line_start": 100,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "wagtail_feature_release_editor_guide_link",
          "type": "decorated_definition",
          "line_start": 108,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "richtext",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": [],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0968,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 156,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2426,
          "ai_signals": []
        },
        {
          "name": "include_block",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 180,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1968,
          "ai_signals": [],
          "decorators": [
            "register.tag"
          ]
        },
        {
          "name": "wagtail_site",
          "type": "decorated_definition",
          "line_start": 206,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 213,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4149,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 13.54,
        "function_length_stddev": 10.37,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 190,
        "comment_ratio": 0.1244,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 6.96,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.021053,
        "structural_uniformity": 0.2338,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.02,
        "mechanical": 92.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 114,
      "token_estimate": 1092,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 114,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\demosite\\apps.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 40,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\headless_urls.py",
      "language": "python",
      "line_count": 14,
      "token_estimate": 112,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 13,
        "comment_ratio": 0.0714,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\manage.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 63,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 10,
        "comment_ratio": 0.0909,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.45,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0002_searchablesnippet.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 185,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 30,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0010_delete_filterablesnippet.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 80,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\media_forms.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 199,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 33,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.2,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0008_modelwithstringtypeprimarykey.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 148,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0016_fullfeaturedsnippet.py",
      "language": "python",
      "line_count": 134,
      "token_estimate": 1157,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 133,
        "comment_ratio": 0.0075,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0024_fullfeaturedsnippet_country_code_and_more.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 211,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 32,
        "comment_ratio": 0.0303,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0032_custompermissionpage.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 243,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 35,
        "comment_ratio": 0.0278,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0040_nocreatablesubpagetypespage_nosubpagetypespage.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 408,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 54,
        "comment_ratio": 0.0182,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0048_requireddatepage.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 257,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 36,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0056_commentablejsonpage.py",
      "language": "python",
      "line_count": 51,
      "token_estimate": 374,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 50,
        "comment_ratio": 0.0196,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\rich_text.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 258,
      "functions": [
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0886,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 18,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4386,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0886,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 33,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4386,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.75,
        "function_length_stddev": 3.2,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 32,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.5,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.0625,
        "structural_uniformity": 0.4432,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.38,
        "mechanical": 84.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\decorators.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 192,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.002,
          "ai_signals": []
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 22,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.352,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 10,
        "function_length_stddev": 9.9,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 27,
        "comment_ratio": 0.129,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.52,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.074074,
        "structural_uniformity": 0.0101,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.48,
        "mechanical": 81.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_factories\\factories.py",
      "language": "python",
      "line_count": 148,
      "token_estimate": 1072,
      "functions": [
        {
          "name": "generate",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "local_inference_no_stop_tokens",
              "severity": "low",
              "line": 28,
              "description": "Local inference without stop sequences -- model generates past useful output, produces trailing garbage",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 28,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_streaming_tts",
              "severity": "medium",
              "line": 28,
              "description": "TTS without streaming -- blocks until entire audio is generated, high latency for long text",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_latency_optimization",
              "severity": "low",
              "line": 28,
              "description": "ElevenLabs TTS without optimize_streaming_latency -- adds unnecessary delay for real-time use",
              "fix_type": "deterministic"
            },
            {
              "id": "elevenlabs_no_pronunciation_dictionary",
              "severity": "low",
              "line": 28,
              "description": "Domain-specific text without pronunciation dictionary -- proper nouns and acronyms mispronounced",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_model_selection",
              "severity": "medium",
              "line": 28,
              "description": "ElevenLabs TTS without explicit model -- defaults may change, breaking voice quality expectations",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_no_nsfw_filter",
              "severity": "high",
              "line": 28,
              "description": "Stability AI generation without NSFW/safety filter -- generated content may contain unsafe material",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_no_seed",
              "severity": "low",
              "line": 28,
              "description": "Stability AI generation without seed parameter -- results not reproducible for debugging or testing",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3976,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0476,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 52,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0476,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create_instance",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0476,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_get_or_create",
          "type": "decorated_definition",
          "line_start": 72,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 77,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 77,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 83,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3976,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 13.2,
        "function_length_stddev": 10.06,
        "import_count": 9,
        "export_count": 5,
        "comment_lines": 1,
        "code_lines": 147,
        "comment_ratio": 0.0068,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.32,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.07483,
        "structural_uniformity": 0.2379,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.23,
        "mechanical": 79.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\permission_policies\\test_site_permission_policies.py",
      "language": "python",
      "line_count": 285,
      "token_estimate": 2444,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 27,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 27,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 34,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 58,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 63,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 68,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 73,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 15,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3807,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_site",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_site_setting",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_site",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_setting",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_sites_user_has_permission_for",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 197,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1085,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_site",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_site",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 284,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0307,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 19.38,
        "function_length_stddev": 16.41,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 281,
        "comment_ratio": 0.014,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.51,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.032028,
        "structural_uniformity": 0.1535,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.18,
        "mechanical": 89.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_audit_log.py",
      "language": "python",
      "line_count": 659,
      "token_estimate": 6498,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 43,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2542,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_log_action_for_page",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_log_action_for_snippet",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_get_for_page_model",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 71,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 71,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_for_snippet_model",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 81,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 81,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 85,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 85,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_for_user",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_get_for_page_instance",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_get_for_snippet_instance",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_create",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3399,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_alias_create_from_published_page_doesnt_log_publish_action",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_edit",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_publish",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_publish_doesnt_log_for_aliases",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_rename",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_unpublish",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_unpublish_doesnt_log_for_aliases",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_revision_revert",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_revision_schedule_publish",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_revision_schedule_revert",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_revision_cancel_schedule",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_lock_unlock",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_copy",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_page_reorder",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 353,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 353,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_move",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 370,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 370,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_delete",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 407,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_workflow_actions",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 481,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 426,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 426,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 448,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 418,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_actions is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.267,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_snippet_workflow_actions",
          "type": "function_definition",
          "line_start": 483,
          "line_end": 549,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 492,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 492,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 514,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 483,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_snippet_workflow_actions is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2572,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "test_workflow_completions_logs_publishing_user",
          "type": "function_definition",
          "line_start": 551,
          "line_end": 568,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 559,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 559,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 562,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 562,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_snippet_workflow_completions_logs_publishing_user",
          "type": "function_definition",
          "line_start": 570,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 581,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 581,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 584,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 584,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3983,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_privacy",
          "type": "function_definition",
          "line_start": 592,
          "line_end": 605,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_hook",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 609,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 613,
          "line_end": 614,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_register_log_actions_hook",
          "type": "function_definition",
          "line_start": 616,
          "line_end": 618,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_action_must_be_registered",
          "type": "function_definition",
          "line_start": 620,
          "line_end": 633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0483,
          "ai_signals": []
        },
        {
          "name": "test_action_format_message",
          "type": "function_definition",
          "line_start": 635,
          "line_end": 658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 657,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1941,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 36,
        "avg_function_length": 16.39,
        "function_length_stddev": 14.32,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 633,
        "comment_ratio": 0.0395,
        "comment_what_ratio": 0.1154,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 32,
        "ai_smell_density": 0.050553,
        "structural_uniformity": 0.126,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.18,
        "mechanical": 84.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_jinja2.py",
      "language": "python",
      "line_count": 313,
      "token_estimate": 2638,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_richtext",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_pageurl",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_fullpageurl",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_slugurl",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_bad_slugurl",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_wagtail_site",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_wagtail_version",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "test_block_render_result_is_safe",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 68,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 81,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3266,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_rich_text_is_safe",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 112,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1316,
          "ai_signals": []
        },
        {
          "name": "test_include_block_tag_with_boundblock",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 133,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.241,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_include_block_tag_with_structvalue",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1889,
          "ai_signals": []
        },
        {
          "name": "test_include_block_tag_with_streamvalue",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 182,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1429,
          "ai_signals": []
        },
        {
          "name": "test_include_block_tag_with_plain_value",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 199,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2915,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_include_block_tag_with_filtered_value",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 216,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 225,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3022,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_include_block_tag_with_additional_variable",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 242,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2915,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_include_block_html_escaping",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 255,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 264,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 276,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 284,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 297,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 306,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 248,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_include_block_html_escaping is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3722,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 18,
        "avg_function_length": 15.39,
        "function_length_stddev": 15.83,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 45,
        "code_lines": 268,
        "comment_ratio": 0.1438,
        "comment_what_ratio": 0.1111,
        "naming_avg_length": 7.33,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.063433,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.08,
        "mechanical": 82.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_permissions.py",
      "language": "python",
      "line_count": 1094,
      "token_estimate": 12463,
      "functions": [
        {
          "name": "create_workflow_and_task",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 37,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonpublisher_page_permissions",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 110,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 44,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 44,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 43,
              "description": "Function is 110 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 110 lines (> 37 dynamic threshold)",
                "impact": "Function test_nonpublisher_page_permissions is 110 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1208,
          "ai_signals": []
        },
        {
          "name": "test_publisher_page_permissions",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 99,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 155,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 155,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 154,
              "description": "Function is 99 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 99 lines (> 37 dynamic threshold)",
                "impact": "Function test_publisher_page_permissions is 99 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1314,
          "ai_signals": []
        },
        {
          "name": "test_can_add_subpage_if_subpage_max_counts_not_reached",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 255,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 255,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_add_subpage_if_subpage_max_counts_reached",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 264,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 264,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_page_permissions_without_edit",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 276,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 276,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 275,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_page_permissions_without_edit is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1754,
          "ai_signals": []
        },
        {
          "name": "test_cannot_bulk_delete_without_permissions",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 347,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 347,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_bulk_delete_with_permissions",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 356,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 356,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_need_delete_permission_to_bulk_delete",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 382,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 382,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_inactive_user_has_no_permissions",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 396,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 396,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_superuser_has_full_permissions",
          "type": "function_definition",
          "line_start": 415,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 93,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 416,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 416,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 415,
              "description": "Function is 93 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 93 lines (> 37 dynamic threshold)",
                "impact": "Function test_superuser_has_full_permissions is 93 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1383,
          "ai_signals": []
        },
        {
          "name": "test_cant_move_pages_between_locales",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 510,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 510,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2312,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_editable_pages_for_user_with_add_permission",
          "type": "function_definition",
          "line_start": 544,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 545,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 545,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 544,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_editable_pages_for_user_with_add_permission is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2946,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_explorable_pages",
          "type": "function_definition",
          "line_start": 584,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 585,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 585,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3297,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_explorable_pages_in_explorer",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 609,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 609,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langsmith_no_feedback",
              "severity": "medium",
              "line": 611,
              "description": "LangSmith runs without feedback collection -- no signal for evaluation or fine-tuning",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 618,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 618,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 618,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 618,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_explorable_pages_with_permission_gap_in_hierarchy",
          "type": "function_definition",
          "line_start": 627,
          "line_end": 642,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 628,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 628,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_editable_pages_for_user_with_edit_permission",
          "type": "function_definition",
          "line_start": 644,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 645,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 645,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 644,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_editable_pages_for_user_with_edit_permission is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2946,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_editable_pages_for_inactive_user",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 718,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 685,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 685,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2254,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_editable_pages_for_superuser",
          "type": "function_definition",
          "line_start": 720,
          "line_end": 752,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 721,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 721,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2375,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_editable_pages_for_non_editing_user",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 755,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 755,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2254,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_lock_page_for_superuser",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 791,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 791,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_moderator",
          "type": "function_definition",
          "line_start": 804,
          "line_end": 811,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 805,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 805,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_moderator_without_unlock_permission",
          "type": "function_definition",
          "line_start": 813,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 814,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 814,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_moderator_whole_locked_page_without_unlock_permission",
          "type": "function_definition",
          "line_start": 826,
          "line_end": 844,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 827,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 827,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_editor",
          "type": "function_definition",
          "line_start": 846,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 847,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 847,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_non_editing_user",
          "type": "function_definition",
          "line_start": 855,
          "line_end": 862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 856,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 856,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lock_page_for_editor_with_lock_permission",
          "type": "function_definition",
          "line_start": 864,
          "line_end": 879,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 865,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 865,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_locked_for_unlocked_page",
          "type": "function_definition",
          "line_start": 881,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 882,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 882,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_locked_for_locked_page",
          "type": "function_definition",
          "line_start": 889,
          "line_end": 908,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 890,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 890,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 905,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 905,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_locked_for_locked_page_with_global_lock_enabled",
          "type": "decorated_definition",
          "line_start": 910,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 912,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 912,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 927,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 927,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_GLOBAL_EDIT_LOCK=True)"
          ]
        },
        {
          "name": "test_page_locked_in_workflow",
          "type": "function_definition",
          "line_start": 933,
          "line_end": 958,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 935,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 935,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 936,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 936,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 937,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 937,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_lock_in_workflow",
          "type": "function_definition",
          "line_start": 960,
          "line_end": 979,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 962,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 962,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 963,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 963,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_permission_tester_page",
          "type": "function_definition",
          "line_start": 981,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 989,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 989,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 998,
          "line_end": 1008,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0254,
          "ai_signals": []
        },
        {
          "name": "test_inactive_user_cannot_copy_any_pages",
          "type": "function_definition",
          "line_start": 1010,
          "line_end": 1025,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1011,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1011,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_permissions_admin_cannot_copy_any_pages",
          "type": "function_definition",
          "line_start": 1027,
          "line_end": 1042,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1028,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1028,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_event_moderator_cannot_copy_a_singleton_page",
          "type": "function_definition",
          "line_start": 1044,
          "line_end": 1061,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1045,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1045,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_even_a_superuser_can_copy_a_singleton_page",
          "type": "function_definition",
          "line_start": 1063,
          "line_end": 1079,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1064,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1064,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_with_permission_type_only",
          "type": "function_definition",
          "line_start": 1087,
          "line_end": 1093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1088,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1088,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 39,
        "avg_function_length": 25.9,
        "function_length_stddev": 25.17,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 80,
        "code_lines": 1014,
        "comment_ratio": 0.0731,
        "comment_what_ratio": 0.0986,
        "naming_avg_length": 9.25,
        "debug_artifacts": [],
        "ai_smell_count": 96,
        "ai_smell_density": 0.094675,
        "structural_uniformity": 0.0282,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.56,
        "mechanical": 71.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_signals.py",
      "language": "python",
      "line_count": 166,
      "token_estimate": 1530,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "test_signal_emitted_on_slug_change",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "test_signal_not_emitted_on_title_change",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "test_signal_not_emitted_on_page_move",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 122,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3935,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "test_signal_emitted_on_page_copy_for_translation_done",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        },
        {
          "name": "test_signal_emitted_on_translatable_model_copy_for_translation_done",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2344,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.87)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 19.57,
        "function_length_stddev": 2.51,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 130,
        "comment_ratio": 0.2169,
        "comment_what_ratio": 0.3,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.007692,
        "structural_uniformity": 0.8719,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.13,
        "mechanical": 90.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_workflow.py",
      "language": "python",
      "line_count": 523,
      "token_estimate": 5746,
      "functions": [
        {
          "name": "test_create_workflow",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_create_task",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "crewai_no_output_file",
              "severity": "low",
              "line": 46,
              "description": "CrewAI task without output_file \u2014 results only in memory",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_task_to_workflow",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_add_workflow_to_page",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_add_workflow_to_snippet",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 69,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 69,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_specific_task",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_from_parent",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_from_closest_ancestor",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_specific_gracefully_handles_missing_rows",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 133,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 133,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "create_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "start_workflow",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 163,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 163,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_methods_generate_no_queries_when_disabled",
          "type": "decorated_definition",
          "line_start": 174,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_start_workflow",
          "type": "decorated_definition",
          "line_start": 194,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_publishing_cancels_workflow_when_cancel_on_publish_true",
          "type": "decorated_definition",
          "line_start": 228,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=True)"
          ]
        },
        {
          "name": "test_publishing_does_not_cancel_workflow_when_cancel_on_publish_false",
          "type": "decorated_definition",
          "line_start": 236,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=False)"
          ]
        },
        {
          "name": "test_error_when_starting_multiple_in_progress_workflows",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_approve_workflow",
          "type": "decorated_definition",
          "line_start": 252,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_workflow_resets_when_new_revision_created",
          "type": "decorated_definition",
          "line_start": 281,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_REQUIRE_REAPPROVAL_ON_EDIT=True)"
          ]
        },
        {
          "name": "test_workflow_does_not_reset_when_new_revision_created_if_reapproval_turned_off",
          "type": "decorated_definition",
          "line_start": 300,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_REQUIRE_REAPPROVAL_ON_EDIT=False)"
          ]
        },
        {
          "name": "test_reject_workflow",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_resume_workflow",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_tasks_with_status_on_resubmission",
          "type": "function_definition",
          "line_start": 351,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_cancel_workflow",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_task_workflows",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_is_at_final_task",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_tasks_with_state",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "test_start_workflow_group_approval_task_locked",
          "type": "function_definition",
          "line_start": 445,
          "line_end": 474,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 455,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2535,
          "ai_signals": []
        },
        {
          "name": "test_workflow_state_cascade_on_object_delete",
          "type": "function_definition",
          "line_start": 476,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 494,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_start_workflow_group_approval_task_locked",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 509,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3427,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 31,
        "avg_function_length": 14.16,
        "function_length_stddev": 8.41,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 487,
        "comment_ratio": 0.0688,
        "comment_what_ratio": 0.2778,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.01848,
        "structural_uniformity": 0.4064,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.84,
        "mechanical": 93.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 56,
      "token_estimate": 435,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 56,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.37,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0009_userprofile_verbose_name_plural.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 117,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\models.py",
      "language": "python",
      "line_count": 138,
      "token_estimate": 1056,
      "functions": [
        {
          "name": "upload_avatar_to",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_for_user",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_preferred_language",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_current_time_zone",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 4.2,
        "function_length_stddev": 2.68,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 137,
        "comment_ratio": 0.0072,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.26,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3611,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.4,
        "mechanical": 98.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\test_bulk_actions\\test_bulk_delete.py",
      "language": "python",
      "line_count": 252,
      "token_estimate": 2326,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2929,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 63,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_permissions_required",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 70,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 72,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_bulk_delete",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_cannot_delete_self",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 92,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4117,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_user_can_delete_other_superuser",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 109,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_before_delete_user_hook_post",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 135,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 137,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_after_delete_user_hook",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 152,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 154,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3096,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 201,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3771,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_with_search",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 208,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 208,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5429,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_search_backend",
          "type": "decorated_definition",
          "line_start": 227,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 243,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3329,
          "ai_signals": [],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"customuser.CustomUser\",\n        \"Only applicable to CustomUser\",\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 17,
        "function_length_stddev": 9.1,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 240,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.57,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.070833,
        "structural_uniformity": 0.4646,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.46,
        "mechanical": 78.46,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\bulk_actions\\delete.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 388,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 27,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 27,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4524,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 37,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4524,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 4.2,
        "function_length_stddev": 2.05,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 43,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.73,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.069767,
        "structural_uniformity": 0.512,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.56,
        "mechanical": 82.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\apps.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 169,
      "functions": [
        {
          "name": "get_app_modules",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5311,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.91)"
          ]
        },
        {
          "name": "get_app_submodules",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 21,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5311,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7.5,
        "function_length_stddev": 0.71,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 16,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.9057,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.75,
        "mechanical": 66.75,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\templates.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 187,
      "functions": [
        {
          "name": "template_is_overridden",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 17,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 21,
        "comment_ratio": 0.2222,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.9,
        "mechanical": 97.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\whitelist.py",
      "language": "python",
      "line_count": 157,
      "token_estimate": 1416,
      "functions": [
        {
          "name": "check_url",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0856,
          "ai_signals": []
        },
        {
          "name": "attribute_rule",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 47,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2022,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0856,
          "ai_signals": []
        },
        {
          "name": "clean_node",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0856,
          "ai_signals": []
        },
        {
          "name": "clean_string_node",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0856,
          "ai_signals": []
        },
        {
          "name": "clean_tag_node",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 140,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 146,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4356,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean_unknown_node",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0856,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 14.14,
        "function_length_stddev": 8.71,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 40,
        "code_lines": 117,
        "comment_ratio": 0.2548,
        "comment_what_ratio": 0.0435,
        "naming_avg_length": 7.04,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.025641,
        "structural_uniformity": 0.3844,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.42,
        "mechanical": 88.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\publish_revision.py",
      "language": "python",
      "line_count": 238,
      "token_estimate": 2061,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 48,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 49,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "log_scheduling_action",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "_after_publish",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "_publish_revision",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 12,
            "max_nesting_depth": 3,
            "parameter_count": 6,
            "line_count": 124,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 108,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 102,
              "description": "Function is 124 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 124 lines (> 15 dynamic threshold)",
                "impact": "Function _publish_revision is 124 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0965,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 31.5,
        "function_length_stddev": 45.39,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 212,
        "comment_ratio": 0.1092,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.66,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.018868,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.0,
        "mechanical": 80.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\move.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 402,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1865,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 48,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5047,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Suspiciously uniform function lengths (0.93)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 10.5,
        "function_length_stddev": 0.71,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 54,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.94,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.018519,
        "structural_uniformity": 0.9327,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.72,
        "mechanical": 93.72,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\apps.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 128,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 4,
              "description": "Unused import: from . import checks",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'checks' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from . import checks",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from wagtail.admin.telepath import widgets",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'widgets' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import widgets",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.43,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 2
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\account.py",
      "language": "python",
      "line_count": 208,
      "token_estimate": 1653,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "_get_language_choices",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 57,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 57,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 60,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 60,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_time_zone_choices",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 70,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 70,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "clean_avatar",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 157,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 163,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 132,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function clean_avatar is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2949,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 189,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2854,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 13.62,
        "function_length_stddev": 13.89,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 205,
        "comment_ratio": 0.0144,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 8.34,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.058537,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.22,
        "mechanical": 79.22,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\search.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 142,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 7,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 20,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\menu.py",
      "language": "python",
      "line_count": 287,
      "token_estimate": 2412,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 14,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "registered_menu_items",
          "type": "decorated_definition",
          "line_start": 85,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 97,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3555,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "menu_items_for_request",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 107,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 112,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 115,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 122,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 130,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "menu_item_class",
          "type": "decorated_definition",
          "line_start": 186,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_menu_item",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 205,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3555,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "menu_hook",
          "type": "decorated_definition",
          "line_start": 212,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "register_menu_item",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "get_submenu_items",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 256,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_menu_item",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 263,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4867,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 8.38,
        "function_length_stddev": 4.25,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 50,
        "code_lines": 237,
        "comment_ratio": 0.1742,
        "comment_what_ratio": 0.1905,
        "naming_avg_length": 7.45,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.059072,
        "structural_uniformity": 0.4931,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.4,
        "mechanical": 83.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\field_panel.py",
      "language": "python",
      "line_count": 408,
      "token_estimate": 3654,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 52,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function get_form_options is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1316,
          "ai_signals": []
        },
        {
          "name": "get_comparison_class",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "db_field",
          "type": "decorated_definition",
          "line_start": 110,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "clean_name",
          "type": "decorated_definition",
          "line_start": 119,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "format_value_for_display",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3649,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 182,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 197,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 199,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3703,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "field_name",
          "type": "decorated_definition",
          "line_start": 203,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "is_required",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "classes",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "icon",
          "type": "decorated_definition",
          "line_start": 236,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 267,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1262,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 274,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 276,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 277,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3816,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "comments_enabled",
          "type": "decorated_definition",
          "line_start": 279,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "value_from_instance",
          "type": "decorated_definition",
          "line_start": 287,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "get_editable_context_data",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 301,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 302,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 303,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 299,
              "description": "Function is 56 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 30 dynamic threshold)",
                "impact": "Function get_editable_context_data is 56 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2816,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_read_only_context_data",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 359,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 360,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3816,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_comparison",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0316,
          "ai_signals": []
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 400,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3816,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 14.91,
        "function_length_stddev": 13.62,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 35,
        "code_lines": 373,
        "comment_ratio": 0.0858,
        "comment_what_ratio": 0.0714,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.045576,
        "structural_uniformity": 0.0866,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.07,
        "mechanical": 82.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\publishing_panel.py",
      "language": "python",
      "line_count": 63,
      "token_estimate": 613,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "clean_name",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "show_panel_furniture",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 11.25,
        "function_length_stddev": 13.52,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 60,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.25,
        "mechanical": 98.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\converters\\html_ruleset.py",
      "language": "python",
      "line_count": 109,
      "token_estimate": 1029,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "add_rules",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 41,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_add_element_rule",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "_add_element_with_attr_rule",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "_add_element_with_attr_exact_rule",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "add_rule",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "match",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 103,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 106,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 10.71,
        "function_length_stddev": 6.02,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 82,
        "comment_ratio": 0.2477,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.95,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.036585,
        "structural_uniformity": 0.4382,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.86,
        "mechanical": 84.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\site_summary.py",
      "language": "python",
      "line_count": 79,
      "token_estimate": 627,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 73,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 76,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 7.29,
        "function_length_stddev": 9.36,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 74,
        "comment_ratio": 0.0633,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.71,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.027027,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.46,
        "mechanical": 90.46,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.fileupload.js",
      "language": "javascript",
      "line_count": 1427,
      "token_estimate": 15428,
      "functions": [
        {
          "name": "getPromise",
          "type": "function_expression",
          "line_start": 623,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0276,
          "ai_signals": []
        },
        {
          "name": "send",
          "type": "function_expression",
          "line_start": 869,
          "line_end": 914,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 898,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 898 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 869,
              "description": "Function is 46 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 30 dynamic threshold)",
                "impact": "Function send is 46 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1797,
          "ai_signals": []
        },
        {
          "name": "errorHandler",
          "type": "function_expression",
          "line_start": 1045,
          "line_end": 1054,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0276,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 19.67,
        "function_length_stddev": 23.07,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 266,
        "code_lines": 1161,
        "comment_ratio": 0.1864,
        "comment_what_ratio": 0.1378,
        "naming_avg_length": 6.62,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.001723,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.83,
        "mechanical": 89.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\telepath\\widgets.py",
      "language": "python",
      "line_count": 79,
      "token_estimate": 471,
      "functions": [
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1252,
          "ai_signals": []
        },
        {
          "name": "get_media",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1252,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 31,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4752,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1252,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 69,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 73,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4752,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 5,
        "function_length_stddev": 1.87,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 74,
        "comment_ratio": 0.0633,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.027027,
        "structural_uniformity": 0.6258,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.24,
        "mechanical": 93.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\help_block.stories.tsx",
      "language": "tsx",
      "line_count": 23,
      "token_estimate": 157,
      "functions": [
        {
          "name": "HelpBlock",
          "type": "arrow_function",
          "line_start": 14,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 14,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "Base",
          "type": "arrow_function",
          "line_start": 16,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "react-unnecessary-fragment",
              "severity": "low",
              "line": 17,
              "description": "React.Fragment wrapping a single child - adds unnecessary nesting",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 4,
        "function_length_stddev": 4.24,
        "import_count": 3,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.086957,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.26,
        "mechanical": 78.26,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\formats\\en\\formats.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 11,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 22.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_content_type_use_view.py",
      "language": "python",
      "line_count": 117,
      "token_estimate": 1106,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1914,
          "ai_signals": []
        },
        {
          "name": "test_with_no_permission",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 26,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 45,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5247,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_content_type_use",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 69,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.483,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_content_type_use_results",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 88,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 88,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 100,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 101,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 19.6,
        "function_length_stddev": 10.64,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 109,
        "comment_ratio": 0.0684,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.091743,
        "structural_uniformity": 0.4569,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.58,
        "mechanical": 73.58,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_move_page.py",
      "language": "python",
      "line_count": 265,
      "token_estimate": 2544,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function setUpTestData is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2176,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1255,
          "ai_signals": []
        },
        {
          "name": "test_page_move",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1255,
          "ai_signals": []
        },
        {
          "name": "test_page_move_bad_permissions",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3314,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_user_without_bulk_delete_permission_can_move",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 91,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 91,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4755,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_move_confirm",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 123,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2713,
          "ai_signals": []
        },
        {
          "name": "test_move_triggers_signals",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 129,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_move_triggers_signals is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1984,
          "ai_signals": []
        },
        {
          "name": "test_before_move_page_hook",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 195,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3199,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_before_move_page_hook_post",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 214,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2777,
          "ai_signals": []
        },
        {
          "name": "test_after_move_page_hook",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 237,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2846,
          "ai_signals": []
        },
        {
          "name": "test_page_move_after_parent_page_types_changes_to_different_parent_model",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 244,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 244,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 262,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4755,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 21.45,
        "function_length_stddev": 12.76,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 238,
        "comment_ratio": 0.1019,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 7.71,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.05042,
        "structural_uniformity": 0.4052,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.87,
        "mechanical": 82.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_unpublish_page.py",
      "language": "python",
      "line_count": 265,
      "token_estimate": 2420,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_view",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 40,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.551,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_view_invalid_page_id",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_view_bad_permissions",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4343,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_view_post",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_after_unpublish_page",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 121,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4538,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_before_unpublish_page",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 140,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 142,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 142,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6093,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_descendants_view",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 157,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4652,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_descendants_view",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 214,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4652,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_include_children_view_post",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_unpublish_not_include_children_view_post",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 19.67,
        "function_length_stddev": 7.49,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 55,
        "code_lines": 210,
        "comment_ratio": 0.2075,
        "comment_what_ratio": 0.6774,
        "naming_avg_length": 7.27,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.038095,
        "structural_uniformity": 0.6193,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.83,
        "mechanical": 86.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_checks.py",
      "language": "python",
      "line_count": 143,
      "token_estimate": 1136,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format_with_unsupported_date",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format_with_unsupported_date_not_using_l10n",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format_with_unsupported_datetime_and_time",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format_with_overriden_format",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_datetime_format_with_incorrect_overriden_format",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1149,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 17.86,
        "function_length_stddev": 8.61,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 140,
        "comment_ratio": 0.021,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5178,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.07,
        "mechanical": 95.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_edit_handlers.py",
      "language": "python",
      "line_count": 2687,
      "token_estimate": 26320,
      "functions": [
        {
          "name": "test_get_form_without_model",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 67,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 67,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 72,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 72,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_form_for_model_without_explicit_fields",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 79,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_form_for_model_without_formsets",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 89,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2306,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_get_form_for_model_with_formsets",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 109,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_direct_form_field_overrides",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 125,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 139,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3507,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_get_form_for_model_with_specific_fields",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 146,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2523,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_get_form_for_model_without_explicit_formsets",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 167,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3156,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_get_form_for_model_with_excluded_fields",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 178,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2523,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_get_form_for_model_with_widget_overrides_by_class",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 196,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_form_for_model_with_widget_overrides_by_instance",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 208,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_urlfield_assume_scheme_override",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 220,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_tag_widget_is_passed_tag_model",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 231,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 231,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 232,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clear_edit_handler",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_handler",
          "type": "decorated_definition",
          "line_start": 280,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(EventPage)"
          ]
        },
        {
          "name": "test_get_form_for_page_with_custom_base",
          "type": "decorated_definition",
          "line_start": 291,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(ValidatedPage)"
          ]
        },
        {
          "name": "test_check_invalid_base_form_class",
          "type": "decorated_definition",
          "line_start": 304,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(ValidatedPage)"
          ]
        },
        {
          "name": "test_custom_edit_handler_form_class",
          "type": "decorated_definition",
          "line_start": 334,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(ValidatedPage)"
          ]
        },
        {
          "name": "test_repr",
          "type": "decorated_definition",
          "line_start": 350,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(ValidatedPage)"
          ]
        },
        {
          "name": "test_can_extract_panel_property",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_exclude",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 384,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_build_panel_list",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 434,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 471,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 471,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 400,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2408,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 484,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1525,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 557,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 516,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 531,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 557,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 557,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 509,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_form_class",
          "type": "function_definition",
          "line_start": 559,
          "line_end": 567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 569,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 580,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 587,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 588,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 591,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 592,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 596,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 597,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 599,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 569,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_render is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_required_fields",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render_form_content",
          "type": "function_definition",
          "line_start": 613,
          "line_end": 629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 624,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2523,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_tabs_permissions",
          "type": "function_definition",
          "line_start": 631,
          "line_end": 739,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 109,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 649,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 653,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 654,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 657,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 658,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 661,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 662,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 665,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 666,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 669,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 670,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 686,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 690,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 691,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 694,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 695,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 698,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 701,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 702,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 705,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 720,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 724,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 725,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 728,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 729,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 732,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 735,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 738,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 631,
              "description": "Function is 109 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 109 lines (> 37 dynamic threshold)",
                "impact": "Function test_tabs_permissions is 109 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 743,
          "line_end": 758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 753,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 758,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 758,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_form_class",
          "type": "function_definition",
          "line_start": 760,
          "line_end": 768,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 770,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 781,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 789,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 791,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 801,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 817,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_charfield_return_value",
          "type": "function_definition",
          "line_start": 819,
          "line_end": 821,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_datefield_return_value",
          "type": "function_definition",
          "line_start": 823,
          "line_end": 825,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_queryset_return_value",
          "type": "function_definition",
          "line_start": 827,
          "line_end": 829,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 833,
          "line_end": 865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 847,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 847,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 851,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 851,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 855,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 855,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 859,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 859,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_form",
          "type": "function_definition",
          "line_start": 867,
          "line_end": 878,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 870,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 872,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_bound_panel",
          "type": "function_definition",
          "line_start": 880,
          "line_end": 889,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 884,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 884,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_accessing_db_field_before_bind",
          "type": "function_definition",
          "line_start": 891,
          "line_end": 895,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_non_model_field",
          "type": "function_definition",
          "line_start": 897,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 900,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 900,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_form_options_includes_non_read_only_fields",
          "type": "function_definition",
          "line_start": 906,
          "line_end": 910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_get_form_options_does_not_include_read_only_fields",
          "type": "function_definition",
          "line_start": 912,
          "line_end": 915,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_boundpanel_is_shown",
          "type": "function_definition",
          "line_start": 917,
          "line_end": 926,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_override_heading",
          "type": "function_definition",
          "line_start": 928,
          "line_end": 940,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 930,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 932,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 935,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 940,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 942,
          "line_end": 965,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 950,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1922,
          "ai_signals": []
        },
        {
          "name": "test_render_html_when_read_only",
          "type": "function_definition",
          "line_start": 967,
          "line_end": 995,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 982,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 994,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2878,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "test_format_value_for_display_with_choicefield",
          "type": "function_definition",
          "line_start": 997,
          "line_end": 1001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_format_value_for_display_with_modelchoicefield",
          "type": "function_definition",
          "line_start": 1003,
          "line_end": 1016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1011,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1011,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_required_fields",
          "type": "function_definition",
          "line_start": 1018,
          "line_end": 1020,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_error_message_is_rendered",
          "type": "function_definition",
          "line_start": 1022,
          "line_end": 1036,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1034,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2797,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_repr",
          "type": "function_definition",
          "line_start": 1038,
          "line_end": 1048,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1052,
          "line_end": 1075,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1057,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1075,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1075,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 1077,
          "line_end": 1112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1094,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1096,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1098,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_error_message_is_rendered",
          "type": "function_definition",
          "line_start": 1114,
          "line_end": 1133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1131,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2214,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1137,
          "line_end": 1159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1142,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1159,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1159,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 1161,
          "line_end": 1184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1178,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1922,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1190,
          "line_end": 1214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1198,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1864,
          "ai_signals": []
        },
        {
          "name": "test_page_chooser_uses_correct_widget",
          "type": "function_definition",
          "line_start": 1216,
          "line_end": 1217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init",
          "type": "function_definition",
          "line_start": 1219,
          "line_end": 1225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1220,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init_with_can_choose_root_true",
          "type": "function_definition",
          "line_start": 1227,
          "line_end": 1246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1232,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1232,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1240,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 1248,
          "line_end": 1259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1249,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_render_as_empty_field",
          "type": "function_definition",
          "line_start": 1261,
          "line_end": 1274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1267,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2964,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_render_error",
          "type": "function_definition",
          "line_start": 1276,
          "line_end": 1283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_override_page_type",
          "type": "function_definition",
          "line_start": 1285,
          "line_end": 1303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1290,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1290,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1298,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_autodetect_page_type",
          "type": "function_definition",
          "line_start": 1305,
          "line_end": 1323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1308,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1318,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_target_models",
          "type": "function_definition",
          "line_start": 1325,
          "line_end": 1330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1326,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_target_models_malformed_type",
          "type": "function_definition",
          "line_start": 1332,
          "line_end": 1334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1333,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1333,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_target_models_nonexistent_type",
          "type": "function_definition",
          "line_start": 1336,
          "line_end": 1340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1337,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1346,
          "line_end": 1349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 1351,
          "line_end": 1433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 83,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1360,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1365,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1365,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1378,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1383,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1388,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1392,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1351,
              "description": "Function is 83 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 83 lines (> 37 dynamic threshold)",
                "impact": "Function test_render is 83 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3837,
          "ai_signals": [
            "High anti-pattern density (0.96)"
          ]
        },
        {
          "name": "test_render_with_panel_overrides",
          "type": "function_definition",
          "line_start": 1435,
          "line_end": 1517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 83,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1444,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1451,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1451,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1465,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1469,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1474,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1478,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1487,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1435,
              "description": "Function is 83 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 83 lines (> 37 dynamic threshold)",
                "impact": "Function test_render_with_panel_overrides is 83 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_thousand_separators_in_js",
          "type": "decorated_definition",
          "line_start": 1519,
          "line_end": 1547,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1531,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1538,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1538,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)"
          ]
        },
        {
          "name": "test_invalid_inlinepanel_declaration",
          "type": "function_definition",
          "line_start": 1549,
          "line_end": 1557,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1551,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1555,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_heading_and_label_from_field",
          "type": "function_definition",
          "line_start": 1559,
          "line_end": 1564,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1559,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1560,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1560,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1564,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_inline_panel_order_with_min_num",
          "type": "function_definition",
          "line_start": 1566,
          "line_end": 1587,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1570,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1571,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1571,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1582,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1593,
          "line_end": 1596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 1598,
          "line_end": 1623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1607,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1610,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1610,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1618,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1621,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1629,
          "line_end": 1632,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_get_comparison",
          "type": "function_definition",
          "line_start": 1634,
          "line_end": 1646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1635,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1645,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1646,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1650,
          "line_end": 1662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 1664,
          "line_end": 1665,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_page_with_inline_model_with_tabbed_panel_only",
          "type": "function_definition",
          "line_start": 1667,
          "line_end": 1687,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_page_with_inline_model_with_two_tabbed_panels",
          "type": "function_definition",
          "line_start": 1689,
          "line_end": 1716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_page_with_inline_model_with_edit_handler",
          "type": "function_definition",
          "line_start": 1718,
          "line_end": 1731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1737,
          "line_end": 1762,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1738,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1738,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1739,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1739,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1744,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1744,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1745,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_comments_toggle_enabled",
          "type": "function_definition",
          "line_start": 1764,
          "line_end": 1777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1774,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1774,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_comments_disabled_setting",
          "type": "decorated_definition",
          "line_start": 1779,
          "line_end": 1801,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1795,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1796,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3507,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "test_comments_enabled_setting",
          "type": "function_definition",
          "line_start": 1803,
          "line_end": 1824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1818,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1819,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_context",
          "type": "function_definition",
          "line_start": 1826,
          "line_end": 1857,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1854,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1558,
          "ai_signals": []
        },
        {
          "name": "test_form",
          "type": "function_definition",
          "line_start": 1859,
          "line_end": 1876,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_comment_form_validation",
          "type": "function_definition",
          "line_start": 1878,
          "line_end": 1934,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1878,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_comment_form_validation is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1078,
          "ai_signals": []
        },
        {
          "name": "test_users_can_edit_comment_positions",
          "type": "function_definition",
          "line_start": 1936,
          "line_end": 1960,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_comment_resolve",
          "type": "decorated_definition",
          "line_start": 1962,
          "line_end": 1996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_comment_reply_form_validation",
          "type": "function_definition",
          "line_start": 1998,
          "line_end": 2069,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1998,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_comment_reply_form_validation is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.095,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2075,
          "line_end": 2085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2079,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2079,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2080,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_schedule_publishing_toggle_toggle_shown",
          "type": "function_definition",
          "line_start": 2087,
          "line_end": 2100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2097,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2097,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publishing_panel_shown_by_default",
          "type": "function_definition",
          "line_start": 2102,
          "line_end": 2125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_form",
          "type": "function_definition",
          "line_start": 2127,
          "line_end": 2134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2140,
          "line_end": 2145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_can_render_panel",
          "type": "function_definition",
          "line_start": 2147,
          "line_end": 2158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2164,
          "line_end": 2170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_get_comparison",
          "type": "function_definition",
          "line_start": 2172,
          "line_end": 2183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2182,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2183,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2187,
          "line_end": 2190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_default_fieldpanel_icon",
          "type": "function_definition",
          "line_start": 2192,
          "line_end": 2217,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2204,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2204,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2211,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_override_fieldpanel_icon",
          "type": "function_definition",
          "line_start": 2219,
          "line_end": 2246,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2232,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2232,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2239,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_override_panelgroup_icon",
          "type": "function_definition",
          "line_start": 2248,
          "line_end": 2279,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2268,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2268,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2275,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3745,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_override_inlinepanel_icon",
          "type": "function_definition",
          "line_start": 2281,
          "line_end": 2309,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2284,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2290,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2298,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2298,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2305,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_override_misc_panel_icon",
          "type": "function_definition",
          "line_start": 2311,
          "line_end": 2339,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2329,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2329,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2335,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2345,
          "line_end": 2348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler_html",
          "type": "function_definition",
          "line_start": 2350,
          "line_end": 2364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2356,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2356,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_page_content_panels_uses_title_field",
          "type": "decorated_definition",
          "line_start": 2366,
          "line_end": 2370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": [],
          "decorators": [
            "clear_edit_handler(Page)"
          ]
        },
        {
          "name": "test_default_title_field_panel",
          "type": "function_definition",
          "line_start": 2372,
          "line_end": 2389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_form_without_slugfield",
          "type": "function_definition",
          "line_start": 2391,
          "line_end": 2397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_form_with_readonly_slugfield",
          "type": "function_definition",
          "line_start": 2399,
          "line_end": 2408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_form_with_readonly_title_field_panel",
          "type": "function_definition",
          "line_start": 2410,
          "line_end": 2420,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_not_using_apply_actions_if_live",
          "type": "function_definition",
          "line_start": 2422,
          "line_end": 2448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_using_apply_actions_if_non_page_model",
          "type": "function_definition",
          "line_start": 2450,
          "line_end": 2460,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2450,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2450,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3964,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_using_apply_actions_if_non_page_model_with_live_property",
          "type": "function_definition",
          "line_start": 2462,
          "line_end": 2500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2462,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_using_apply_actions_if_non_page_model_with_live_property is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1361,
          "ai_signals": []
        },
        {
          "name": "test_targets_override_with_empty",
          "type": "function_definition",
          "line_start": 2502,
          "line_end": 2509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_targets_override_with_non_slug_field",
          "type": "function_definition",
          "line_start": 2511,
          "line_end": 2521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_targets_override_with_multiple_fields",
          "type": "function_definition",
          "line_start": 2523,
          "line_end": 2537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_classname_override",
          "type": "function_definition",
          "line_start": 2539,
          "line_end": 2550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_merging_data_attrs",
          "type": "function_definition",
          "line_start": 2552,
          "line_end": 2586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_false",
          "type": "function_definition",
          "line_start": 2588,
          "line_end": 2599,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_none",
          "type": "function_definition",
          "line_start": 2601,
          "line_end": 2610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_empty_string",
          "type": "function_definition",
          "line_start": 2612,
          "line_end": 2621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_via_widget",
          "type": "function_definition",
          "line_start": 2623,
          "line_end": 2642,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_via_widget_over_kwarg",
          "type": "function_definition",
          "line_start": 2644,
          "line_end": 2664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        },
        {
          "name": "test_placeholder_override_via_widget_over_false_kwarg",
          "type": "function_definition",
          "line_start": 2666,
          "line_end": 2686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0464,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 130,
        "avg_function_length": 18.71,
        "function_length_stddev": 16.88,
        "import_count": 27,
        "export_count": 0,
        "comment_lines": 229,
        "code_lines": 2458,
        "comment_ratio": 0.0852,
        "comment_what_ratio": 0.1342,
        "naming_avg_length": 7.79,
        "debug_artifacts": [],
        "ai_smell_count": 209,
        "ai_smell_density": 0.085028,
        "structural_uniformity": 0.0978,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.32,
        "mechanical": 75.32,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_menu.py",
      "language": "python",
      "line_count": 425,
      "token_estimate": 3774,
      "functions": [
        {
          "name": "menu_item_hook",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "test_remember_collapsed",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "test_simple_menu",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "test_menu_with_construct_hook",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "test_submenu",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 112,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2002,
          "ai_signals": []
        },
        {
          "name": "test_dismissible_initial",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 152,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 120,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_dismissible_initial is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1842,
          "ai_signals": []
        },
        {
          "name": "test_dismissible_dismissed",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 180,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_dismissible_dismissed is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1701,
          "ai_signals": []
        },
        {
          "name": "test_dismissible_no_userprofile",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 284,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 248,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_dismissible_no_userprofile is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1822,
          "ai_signals": []
        },
        {
          "name": "test_admin_only_menuitem",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0656,
          "ai_signals": []
        },
        {
          "name": "test_menu_items_have_names",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 347,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 367,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 369,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4156,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submenu_items_have_names",
          "type": "function_definition",
          "line_start": 372,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 377,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 385,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 388,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 389,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 421,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 423,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 372,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_submenu_items_have_names is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4156,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 32.67,
        "function_length_stddev": 21.96,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 398,
        "comment_ratio": 0.0635,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.91,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.042714,
        "structural_uniformity": 0.3279,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.15,
        "mechanical": 79.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_rich_text.py",
      "language": "python",
      "line_count": 653,
      "token_estimate": 5693,
      "functions": [
        {
          "name": "_clear_edit_handler_cache",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3276,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_default",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "override_settings()  # create temporary copy of settings so we can remove WAGTAILADMIN_RICH_TEXT_EDITORS"
          ]
        },
        {
          "name": "test_overridden_default_editor",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"default\": {\"WIDGET\": \"wagtail.test.testapp.rich_text.CustomRichTextArea\"},\n        }\n    )"
          ]
        },
        {
          "name": "test_custom_editor_without_default",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"custom\": {\"WIDGET\": \"wagtail.test.testapp.rich_text.CustomRichTextArea\"},\n        }\n    )"
          ]
        },
        {
          "name": "test_custom_editor_with_default",
          "type": "decorated_definition",
          "line_start": 80,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"default\": {\"WIDGET\": \"wagtail.test.testapp.rich_text.LegacyRichTextArea\"},\n            \"custom\": {\"WIDGET\": \"wagtail.test.testapp.rich_text.CustomRichTextArea\"},\n        }\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_default_editor_in_rich_text_field",
          "type": "decorated_definition",
          "line_start": 99,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 121,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 124,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4026,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ],
          "decorators": [
            "override_settings()  # create temporary copy of settings so we can remove WAGTAILADMIN_RICH_TEXT_EDITORS"
          ]
        },
        {
          "name": "test_default_editor_in_rich_text_block",
          "type": "decorated_definition",
          "line_start": 127,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 150,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 153,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ],
          "decorators": [
            "unittest.expectedFailure  # TODO(telepath)",
            "override_settings()  # create temporary copy of settings so we can remove WAGTAILADMIN_RICH_TEXT_EDITORS"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_feature_media_on_rich_text_field",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 186,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 187,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_feature_media_on_rich_text_block",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 198,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 199,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_overridden_default_editor_in_rich_text_field",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_overridden_default_editor_in_rich_text_block",
          "type": "decorated_definition",
          "line_start": 238,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "unittest.expectedFailure  # TODO(telepath)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_custom_editor_in_rich_text_field",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_custom_editor_in_rich_text_block",
          "type": "decorated_definition",
          "line_start": 299,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 312,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "unittest.expectedFailure  # TODO(telepath)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_settings_features_option_on_rich_text_field",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 363,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.31,
          "ai_signals": []
        },
        {
          "name": "test_features_option_on_rich_text_block",
          "type": "decorated_definition",
          "line_start": 378,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "unittest.expectedFailure  # TODO(telepath)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_additional_features_should_not_be_included_by_default",
          "type": "decorated_definition",
          "line_start": 403,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 421,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 403,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_additional_features_should_not_be_included_by_default is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3228,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"default\": {\n                \"WIDGET\": \"wagtail.admin.rich_text.DraftailRichTextArea\",\n            },\n        }\n    )"
          ]
        },
        {
          "name": "test_additional_features_included",
          "type": "decorated_definition",
          "line_start": 443,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 470,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 443,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_additional_features_included is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2862,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"default\": {\n                \"WIDGET\": \"wagtail.admin.rich_text.DraftailRichTextArea\",\n                \"OPTIONS\": {\n                    \"features\": [\n                        \"h2\",\n                        \"code\",\n                        \"blockquote\",\n                        \"strikethrough\",\n                        \"subscript\",\n                        \"superscript\",\n                    ]\n                },\n            },\n        }\n    )"
          ]
        },
        {
          "name": "test_get_db_attributes",
          "type": "function_definition",
          "line_start": 497,
          "line_end": 501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_editorhtmlconverter_from_database_format",
          "type": "function_definition",
          "line_start": 515,
          "line_end": 524,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_draftail",
          "type": "function_definition",
          "line_start": 528,
          "line_end": 532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_versioned_static_media",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 538,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 544,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 549,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_chooser_urls_exist",
          "type": "decorated_definition",
          "line_start": 557,
          "line_end": 588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_RICH_TEXT_EDITORS={\n            \"default\": {\n                \"WIDGET\": \"wagtail.admin.rich_text.DraftailRichTextArea\",\n            },\n        }\n    )"
          ]
        },
        {
          "name": "test_lazy_chooser_urls_resolved_correctly",
          "type": "function_definition",
          "line_start": 590,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 598,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2379,
          "ai_signals": []
        },
        {
          "name": "test_lazy_urls_resolution",
          "type": "function_definition",
          "line_start": 628,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        },
        {
          "name": "test_context_i18n",
          "type": "function_definition",
          "line_start": 643,
          "line_end": 652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1433,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 37,
        "avg_function_length": 14.27,
        "function_length_stddev": 10.96,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 45,
        "code_lines": 608,
        "comment_ratio": 0.0689,
        "comment_what_ratio": 0.4848,
        "naming_avg_length": 8.27,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.029605,
        "structural_uniformity": 0.2319,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.02,
        "mechanical": 91.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_whats_new.py",
      "language": "python",
      "line_count": 133,
      "token_estimate": 1392,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_parent_context",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": []
        },
        {
          "name": "test_get_whats_new_banner_setting_default",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": []
        },
        {
          "name": "test_get_whats_new_banner_setting_false",
          "type": "decorated_definition",
          "line_start": 28,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_WHATS_NEW_BANNER=False)"
          ]
        },
        {
          "name": "test_render_html_user_initial",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 33,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html_setting_false",
          "type": "decorated_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 45,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_WHATS_NEW_BANNER=False)"
          ]
        },
        {
          "name": "test_render_html_user_no_profile",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 51,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html_user_dismissed",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0796,
          "ai_signals": []
        },
        {
          "name": "test_get_enabled_initial",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 82,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_disabled_initial",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 95,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 101,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_WHATS_NEW_BANNER=False)"
          ]
        },
        {
          "name": "test_render_html_user_no_profile",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 109,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 115,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_enabled_dismissed",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 124,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 130,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4296,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 7.36,
        "function_length_stddev": 4.43,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 132,
        "comment_ratio": 0.0075,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.88,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.106061,
        "structural_uniformity": 0.3978,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.04,
        "mechanical": 73.04,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\viewsets\\test_base_viewset.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 435,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "test_menu_items",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "test_calendar_index_view",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "test_calendar_month_view",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "test_greetings_view",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "test_method_injection",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1147,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 5.5,
        "function_length_stddev": 2.35,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 47,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5736,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\menus\\__init__.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 233,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 9,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 10,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.51,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.16,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.80)"
          ]
        },
        {
          "name": "__lt__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 25,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.51,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5,
        "function_length_stddev": 1.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 16,
        "comment_ratio": 0.3846,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.55,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.1875,
        "structural_uniformity": 0.8,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.17,
        "mechanical": 73.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\collections.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 133,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\collection_privacy.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 806,
      "functions": [
        {
          "name": "set_privacy",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 11,
              "description": "Function is 73 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 30 dynamic threshold)",
                "impact": "Function set_privacy is 73 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0813,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 73,
        "function_length_stddev": 0.0,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 78,
        "comment_ratio": 0.0714,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 9.99,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.012821,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 47.29,
        "mechanical": 47.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\lock.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 358,
      "functions": [
        {
          "name": "perform_operation",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "perform_operation",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 43,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.33,
        "mechanical": 96.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\workflow.py",
      "language": "python",
      "line_count": 276,
      "token_estimate": 2486,
      "functions": [
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_redirect_url",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_task_state",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_task",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "add_not_in_moderation_error",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "check_action",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 71,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2392,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_submit_url",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "render_modal_form",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "render_modal_json",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_task",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get_task_state",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "add_error_message",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 24,
        "avg_function_length": 8.62,
        "function_length_stddev": 7.74,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 254,
        "comment_ratio": 0.0797,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.71,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.003937,
        "structural_uniformity": 0.102,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.18,
        "mechanical": 96.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\move.py",
      "language": "python",
      "line_count": 159,
      "token_estimate": 1444,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2188,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 54,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_actionable_objects",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 103,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 67,
              "description": "Function is 61 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 30 dynamic threshold)",
                "impact": "Function get_actionable_objects is 61 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1721,
          "ai_signals": []
        },
        {
          "name": "prepare_action",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 150,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 155,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 12.8,
        "function_length_stddev": 17.52,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 158,
        "comment_ratio": 0.0063,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.13,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.037975,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.02,
        "mechanical": 87.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\delete.py",
      "language": "python",
      "line_count": 117,
      "token_estimate": 1278,
      "functions": [
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 17,
            "max_nesting_depth": 6,
            "parameter_count": 2,
            "line_count": 100,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 73,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 17,
              "description": "Nesting depth 6 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 6 > 4",
                "impact": "Nesting depth 6 at line 17 in delete makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 17,
              "description": "Function is 100 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 100 lines (> 15 dynamic threshold)",
                "impact": "Function delete is 100 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.265,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 100,
        "function_length_stddev": 0.0,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 107,
        "comment_ratio": 0.0855,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.065421,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 28.64,
        "mechanical": 28.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\revisions.py",
      "language": "python",
      "line_count": 139,
      "token_estimate": 1211,
      "functions": [
        {
          "name": "revisions_index",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_action_menu",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "_add_warning_message",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_revisions_revert_url",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_warning_message",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "decorated_definition",
          "line_start": 105,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": [],
          "decorators": [
            "method_decorator(user_passes_test(user_has_any_page_permission))"
          ]
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        },
        {
          "name": "get_object_display_title",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0402,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 4.47,
        "function_length_stddev": 3.57,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 135,
        "comment_ratio": 0.0288,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2008,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.35,
        "mechanical": 99.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\audit_logging.py",
      "language": "python",
      "line_count": 191,
      "token_estimate": 1920,
      "functions": [
        {
          "name": "get_users_for_filter",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 25,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 25,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 28,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 28,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_content_types_for_filter",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 34,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 34,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_actions_for_filter",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 45,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 45,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filter_object_type",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 62,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_action_choices",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_user_choices",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 105,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 109,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_filtered_queryset",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 124,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 124,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 138,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 138,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 138,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 141,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 143,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 143,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 148,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 116,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function get_filtered_queryset is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 166,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 167,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 174,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 176,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 181,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_action_label",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 189,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 190,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 10.64,
        "function_length_stddev": 13.62,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 160,
        "comment_ratio": 0.1623,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 8.39,
        "debug_artifacts": [],
        "ai_smell_count": 31,
        "ai_smell_density": 0.19375,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.08,
        "mechanical": 71.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\viewsets\\base.py",
      "language": "python",
      "line_count": 153,
      "token_estimate": 1355,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 34,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3827,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        },
        {
          "name": "construct_view",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        },
        {
          "name": "inject_view_methods",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 73,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1673,
          "ai_signals": []
        },
        {
          "name": "url_prefix",
          "type": "decorated_definition",
          "line_start": 85,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 86,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 88,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 91,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3827,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "url_namespace",
          "type": "decorated_definition",
          "line_start": 101,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        },
        {
          "name": "get_url_name",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        },
        {
          "name": "menu_icon",
          "type": "decorated_definition",
          "line_start": 134,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "menu_url",
          "type": "decorated_definition",
          "line_start": 138,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0327,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 8.58,
        "function_length_stddev": 7.18,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 57,
        "code_lines": 96,
        "comment_ratio": 0.3725,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.98,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.052083,
        "structural_uniformity": 0.1636,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.19,
        "mechanical": 85.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\button.py",
      "language": "python",
      "line_count": 253,
      "token_estimate": 1894,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 23,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 30,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": []
        },
        {
          "name": "base_attrs_string",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "aria_label",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 58,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__lt__",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 67,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__le__",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__gt__",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 77,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__ge__",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 82,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 88,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "from_menu_item",
          "type": "decorated_definition",
          "line_start": 95,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3198,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 7,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 136,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 139,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 153,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 155,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": []
        },
        {
          "name": "dropdown_buttons",
          "type": "decorated_definition",
          "line_start": 174,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "base_attrs_string",
          "type": "decorated_definition",
          "line_start": 178,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 182,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 183,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 185,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 193,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 194,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 215,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 227,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "show",
          "type": "decorated_definition",
          "line_start": 229,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0506,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "dropdown_buttons",
          "type": "decorated_definition",
          "line_start": 233,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 238,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 244,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4006,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 22,
        "avg_function_length": 8.23,
        "function_length_stddev": 7.41,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 237,
        "comment_ratio": 0.0632,
        "comment_what_ratio": 0.1538,
        "naming_avg_length": 6.82,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.118143,
        "structural_uniformity": 0.099,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.91,
        "mechanical": 72.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 10,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .conf import APIField",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'APIField' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .conf import APIField",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\signal_handlers.py",
      "language": "python",
      "line_count": 62,
      "token_estimate": 541,
      "functions": [
        {
          "name": "purge_page_from_cache",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1193,
          "ai_signals": []
        },
        {
          "name": "purge_image_from_cache",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1193,
          "ai_signals": []
        },
        {
          "name": "purge_document_from_cache",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1193,
          "ai_signals": []
        },
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 37,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 37,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 38,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 38,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 40,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4693,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "unregister_signal_handlers",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 51,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 51,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 52,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 52,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4693,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 8.2,
        "function_length_stddev": 3.49,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 62,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.27,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.16129,
        "structural_uniformity": 0.574,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.6,
        "mechanical": 70.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\views.py",
      "language": "python",
      "line_count": 635,
      "token_estimate": 5367,
      "functions": [
        {
          "name": "renderer_classes",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 81,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3833,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "listing_view",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "detail_view",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "find_view",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 126,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 126,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 135,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.372,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "find_object",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "handle_exception",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "_convert_api_fields",
          "type": "decorated_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_body_fields",
          "type": "decorated_definition",
          "line_start": 163,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_body_fields_names",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_meta_fields",
          "type": "decorated_definition",
          "line_start": 173,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_meta_fields_names",
          "type": "decorated_definition",
          "line_start": 179,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_field_serializer_overrides",
          "type": "decorated_definition",
          "line_start": 183,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_available_fields",
          "type": "decorated_definition",
          "line_start": 191,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 207,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 208,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 211,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3833,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_detail_default_fields",
          "type": "decorated_definition",
          "line_start": 217,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_listing_default_fields",
          "type": "decorated_definition",
          "line_start": 221,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_nested_default_fields",
          "type": "decorated_definition",
          "line_start": 225,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "check_query_parameters",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "_get_serializer_class",
          "type": "decorated_definition",
          "line_start": 246,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 113,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 260,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 263,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 286,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 290,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 293,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 297,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 309,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 322,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 322,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 326,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 326,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 327,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 327,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 328,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 328,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 331,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 331,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 246,
              "description": "Function is 113 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 113 lines (> 37 dynamic threshold)",
                "impact": "Function _get_serializer_class is 113 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3833,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_serializer_class",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 373,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1462,
          "ai_signals": []
        },
        {
          "name": "get_serializer_context",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "get_renderer_context",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "decorated_definition",
          "line_start": 407,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 410,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 410,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3833,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_model_listing_urlpath",
          "type": "decorated_definition",
          "line_start": 418,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_object_detail_urlpath",
          "type": "decorated_definition",
          "line_start": 427,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_detail_default_fields",
          "type": "decorated_definition",
          "line_start": 492,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_listing_default_fields",
          "type": "decorated_definition",
          "line_start": 502,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_root_page",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 516,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 518,
          "line_end": 578,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 539,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 571,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 518,
              "description": "Function is 61 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 30 dynamic threshold)",
                "impact": "Function get_base_queryset is 61 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2055,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 580,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 587,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.163,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "find_object",
          "type": "function_definition",
          "line_start": 612,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "get_serializer_context",
          "type": "function_definition",
          "line_start": 628,
          "line_end": 634,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 35,
        "avg_function_length": 13.66,
        "function_length_stddev": 20.88,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 74,
        "code_lines": 561,
        "comment_ratio": 0.1165,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 32,
        "ai_smell_density": 0.057041,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.93,
        "mechanical": 81.93,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\list_block.py",
      "language": "python",
      "line_count": 507,
      "token_estimate": 4696,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 26,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function __init__ is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1772,
          "ai_signals": []
        },
        {
          "name": "as_json_data",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 76,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3432,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__setitem__",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__delitem__",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "insert",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 131,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 131,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 161,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 175,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 176,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 178,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 179,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 183,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 187,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 189,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 197,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 198,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 212,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 221,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 204,
              "description": "Function is 46 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 30 dynamic threshold)",
                "impact": "Function clean is 46 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2532,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "empty_value",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "_item_is_in_block_format",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 291,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1841,
          "ai_signals": []
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 309,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 323,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 325,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 303,
              "description": "Function is 37 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 37 lines (> 30 dynamic threshold)",
                "impact": "Function bulk_to_python is 37 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 349,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.275,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 392,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 398,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2942,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 418,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2583,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 465,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 468,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.275,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 492,
          "line_end": 498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 496,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 34,
        "avg_function_length": 11.97,
        "function_length_stddev": 11.78,
        "import_count": 11,
        "export_count": 2,
        "comment_lines": 54,
        "code_lines": 453,
        "comment_ratio": 0.1065,
        "comment_what_ratio": 0.1087,
        "naming_avg_length": 7.4,
        "debug_artifacts": [],
        "ai_smell_count": 30,
        "ai_smell_density": 0.066225,
        "structural_uniformity": 0.0162,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.44,
        "mechanical": 77.44,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\checks.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 298,
      "functions": [
        {
          "name": "page_search_fields_check",
          "type": "decorated_definition",
          "line_start": 4,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 17,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (0.69)",
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "register(\"search\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 29,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 30,
        "comment_ratio": 0.0909,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 6.51,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.63,
        "mechanical": 77.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\migrations\\0003_capitalizeverbose.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 132,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.13,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\tests\\test_models.py",
      "language": "python",
      "line_count": 904,
      "token_estimate": 8091,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_get_form",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 36,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 37,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_get_form_without_help_text_escaping",
          "type": "decorated_definition",
          "line_start": 45,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ],
          "decorators": [
            "override_settings(WAGTAILFORMS_HELP_TEXT_ALLOW_HTML=True)"
          ]
        },
        {
          "name": "test_label_escaping",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 53,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 58,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_invalid_form",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 69,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 84,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 85,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4419,
          "ai_signals": [
            "High anti-pattern density (0.57)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_unicode_characters",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_multiple_values",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 138,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 139,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4919,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_blank_checkbox",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 167,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 168,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_invalid_from_address",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_string_representation_form_submission",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_get_form",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 211,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 213,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 215,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 217,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 218,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_get_form_with_anonymous_user",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 230,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 232,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 234,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 236,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 237,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_invalid_form",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 250,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 252,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 268,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 271,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 255,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_valid_form is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5111,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_form_twice",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 308,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 311,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 313,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 315,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 338,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 340,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 343,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 346,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 348,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 349,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 295,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_form_twice is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_unicode_characters",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_multiple_values",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 389,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 392,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5111,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_blank_checkbox",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 416,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 419,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.56,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 428,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_invalid_to_address",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 451,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 452,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.454,
          "ai_signals": [
            "High anti-pattern density (0.61)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 498,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 501,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.431,
          "ai_signals": [
            "High anti-pattern density (0.54)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 576,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 583,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5219,
          "ai_signals": [
            "High anti-pattern density (0.80)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_get_form",
          "type": "function_definition",
          "line_start": 588,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 593,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 596,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 598,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 608,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 609,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 612,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_invalid_form",
          "type": "function_definition",
          "line_start": 614,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 619,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 627,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 630,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 637,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 643,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 646,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post_valid_form",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 654,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 663,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 666,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_empty_field_presence",
          "type": "function_definition",
          "line_start": 675,
          "line_end": 691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_email_field_order",
          "type": "function_definition",
          "line_start": 693,
          "line_end": 717,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 715,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3819,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_date_normalization",
          "type": "decorated_definition",
          "line_start": 719,
          "line_end": 741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ],
          "decorators": [
            "override_settings(SHORT_DATE_FORMAT=\"m/d/Y\")"
          ]
        },
        {
          "name": "test_datetime_normalization",
          "type": "decorated_definition",
          "line_start": 743,
          "line_end": 773,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ],
          "decorators": [
            "override_settings(SHORT_DATETIME_FORMAT=\"m/d/Y P\")"
          ]
        },
        {
          "name": "test_date_localization",
          "type": "decorated_definition",
          "line_start": 775,
          "line_end": 786,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ],
          "decorators": [
            "override_settings(USE_I18N=True, LANGUAGE_CODE=\"de\")"
          ]
        },
        {
          "name": "test_datetime_localization",
          "type": "decorated_definition",
          "line_start": 788,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ],
          "decorators": [
            "override_settings(USE_I18N=True, LANGUAGE_CODE=\"de\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 805,
          "line_end": 814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 812,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 816,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 828,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3819,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_non_html_extension",
          "type": "function_definition",
          "line_start": 846,
          "line_end": 850,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 856,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_form_field_clean_name_creation",
          "type": "function_definition",
          "line_start": 862,
          "line_end": 871,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 867,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 875,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.89)"
          ]
        },
        {
          "name": "test_form_field_clean_name_override",
          "type": "function_definition",
          "line_start": 889,
          "line_end": 903,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 898,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 899,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5919,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.89)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 45,
        "avg_function_length": 17.93,
        "function_length_stddev": 12.27,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 85,
        "code_lines": 819,
        "comment_ratio": 0.094,
        "comment_what_ratio": 0.8933,
        "naming_avg_length": 7.33,
        "debug_artifacts": [],
        "ai_smell_count": 72,
        "ai_smell_density": 0.087912,
        "structural_uniformity": 0.316,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.39,
        "mechanical": 75.39,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\apps.py",
      "language": "python",
      "line_count": 14,
      "token_estimate": 101,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0062,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 14,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.37,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\management\\commands\\import_redirects.py",
      "language": "python",
      "line_count": 204,
      "token_estimate": 1523,
      "functions": [
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 17,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function add_arguments is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0614,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 16,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 125,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_dataset_version",
              "severity": "medium",
              "line": 120,
              "description": "LangSmith dataset created without versioning -- no reproducibility for evaluations",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 138,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 75,
              "description": "Function is 125 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 125 lines (> 15 dynamic threshold)",
                "impact": "Function handle is 125 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_input",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 61.33,
        "function_length_stddev": 61.61,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 204,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.3,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.019608,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 63.6,
        "mechanical": 63.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0007_add_autocreate_fields.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 305,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 38,
        "comment_ratio": 0.0256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_import_admin_views.py",
      "language": "python",
      "line_count": 377,
      "token_estimate": 2981,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "post_import",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "test_request_start_with_get_returns_initial_form",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 37,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_import_file_returns_error",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 49,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_non_valid_format_returns_error",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "test_valid_csv_triggers_confirm_view",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 83,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 86,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_import_step",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 113,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_import_step_with_offset_columns",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 134,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 142,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_permanent_setting",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 163,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 171,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_site_setting",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 198,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 207,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2627,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_import_xlsx",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 227,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 231,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 239,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unicode_error_when_importing",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 257,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.287,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_not_valid_method_for_import_file",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0682,
          "ai_signals": []
        },
        {
          "name": "test_error_in_data_renders_confirm_view_on_import",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 278,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 285,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3726,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_import_tsv",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 288,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 302,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 306,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 314,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_import_xlsx_with_cache_store_engine",
          "type": "decorated_definition",
          "line_start": 318,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 334,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 338,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 346,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_REDIRECTS_FILE_STORAGE=\"cache\")"
          ]
        },
        {
          "name": "test_process_validation_works_when_using_plaintext_files_and_cache",
          "type": "decorated_definition",
          "line_start": 349,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 365,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 369,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 375,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4182,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_REDIRECTS_FILE_STORAGE=\"cache\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 19,
        "avg_function_length": 17.95,
        "function_length_stddev": 11.82,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 377,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.2,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.074271,
        "structural_uniformity": 0.3411,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.47,
        "mechanical": 77.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tmp_storages.py",
      "language": "python",
      "line_count": 112,
      "token_estimate": 934,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "read",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "remove",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "open",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "read",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "remove",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "get_full_path",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "read",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "remove",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "read",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "remove",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        },
        {
          "name": "get_full_path",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1024,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 2.75,
        "function_length_stddev": 1.34,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 83,
        "comment_ratio": 0.2589,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5121,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.41,
        "mechanical": 98.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0007_searchpromotion_external_link_text_and_more.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 419,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 54,
        "comment_ratio": 0.0182,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\templatetags\\wagtailsearchpromotions_tags.py",
      "language": "python",
      "line_count": 14,
      "token_estimate": 84,
      "functions": [
        {
          "name": "get_search_promotions",
          "type": "decorated_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 14,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\context_processors.py",
      "language": "python",
      "line_count": 76,
      "token_estimate": 616,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "__missing__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 15,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 16,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 25,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "__missing__",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_setting",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3333,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "settings",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 6.25,
        "function_length_stddev": 9.63,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 63,
        "comment_ratio": 0.1711,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.111111,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.62,
        "mechanical": 72.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\site_specific\\base.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 296,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1661,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.83)"
          ]
        },
        {
          "name": "get_request",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1661,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12.5,
        "function_length_stddev": 2.12,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 30,
        "comment_ratio": 0.0909,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.59,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.8303,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.5,
        "mechanical": 96.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\tests\\test_migrations.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 137,
      "functions": [
        {
          "name": "test_content_type_exists",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4934,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.72)"
          ]
        },
        {
          "name": "test_permission_exists",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1434,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.72)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.87,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.052632,
        "structural_uniformity": 0.7172,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.84,
        "mechanical": 86.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\sitemaps\\sitemap_generator.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 465,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "location",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "lastmod",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "get_wagtail_site",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "items",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "_urls",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 47,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 49,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 6.67,
        "function_length_stddev": 5.13,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 48,
        "comment_ratio": 0.1273,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.24,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.0625,
        "structural_uniformity": 0.2312,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.21,
        "mechanical": 81.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\styleguide\\wagtail_hooks.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 150,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1192,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "register_styleguide_menu_item",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1192,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7,
        "function_length_stddev": 2.83,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5959,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\components.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 40,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0005_document_collection.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 171,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 27,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0013_delete_uploadeddocument.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 76,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\signal_handlers.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 136,
      "functions": [
        {
          "name": "post_delete_file_cleanup",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1194,
          "ai_signals": []
        },
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 17,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4694,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 4.5,
        "function_length_stddev": 2.12,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.82,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.105263,
        "structural_uniformity": 0.5286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_bulk_actions\\test_bulk_delete.py",
      "language": "python",
      "line_count": 136,
      "token_estimate": 1276,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 14,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "cohere_document_no_id",
              "severity": "medium",
              "line": 16,
              "description": "RAG documents without unique IDs \u2014 can't track citations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.446,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.096,
          "ai_signals": []
        },
        {
          "name": "test_delete_with_limited_permissions",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 44,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 49,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 58,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.446,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.446,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 76,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.446,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 82,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 84,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.446,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 98,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2256,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 130,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2802,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.38,
        "function_length_stddev": 9.27,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 128,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 7.44,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.109375,
        "structural_uniformity": 0.3549,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.56,
        "mechanical": 70.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_serializers.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 662,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "test_serializer_wagtaildocs_serve_redirect",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 41,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 41,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 43,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_SERVE_METHOD=\"redirect\",\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n        WAGTAILAPI_BASE_URL=\"http://example.com/\",\n    )"
          ]
        },
        {
          "name": "test_serializer_wagtaildocs_serve_direct",
          "type": "decorated_definition",
          "line_start": 53,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 64,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 64,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 66,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_SERVE_METHOD=\"direct\",\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n        MEDIA_URL=\"http://remotestorage.com/media/\",\n        WAGTAILAPI_BASE_URL=\"http://example.com/\",\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 11.4,
        "function_length_stddev": 9.26,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 70,
        "comment_ratio": 0.0667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.085714,
        "structural_uniformity": 0.1875,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.15,
        "mechanical": 78.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\bulk_actions\\add_to_collection.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 539,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0764,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 51,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 5.67,
        "function_length_stddev": 3.5,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 58,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.43,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.068966,
        "structural_uniformity": 0.3819,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.76,
        "mechanical": 82.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\widgets.py",
      "language": "python",
      "line_count": 4,
      "token_estimate": 31,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 4,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\embedly.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 521,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.71)"
          ]
        },
        {
          "name": "get_key",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.71)"
          ]
        },
        {
          "name": "accept",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.71)"
          ]
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 30,
              "description": "Function is 44 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 30 dynamic threshold)",
                "impact": "Function find_embed is 44 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2224,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 13,
        "function_length_stddev": 20.67,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 70,
        "comment_ratio": 0.0909,
        "comment_what_ratio": 0.7143,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.014286,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.53,
        "mechanical": 89.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0003_capitalizeverbose.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 75,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.27,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\models.py",
      "language": "python",
      "line_count": 62,
      "token_estimate": 481,
      "functions": [
        {
          "name": "ratio",
          "type": "decorated_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "ratio_css",
          "type": "decorated_definition",
          "line_start": 48,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_responsive",
          "type": "decorated_definition",
          "line_start": 54,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 4,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 52,
        "comment_ratio": 0.1613,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.2,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6464,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\templatetags\\wagtailembeds_tags.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 104,
      "functions": [
        {
          "name": "embed_tag",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 15,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.simple_tag(name=\"embed\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 7,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.058824,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.29,
        "mechanical": 85.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\exceptions.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 77,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 4,
        "comment_ratio": 0.6,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.27,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\blocks.py",
      "language": "python",
      "line_count": 296,
      "token_estimate": 2553,
      "functions": [
        {
          "name": "target_model",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4222,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "widget",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_comparison_class",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 83,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 86,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4222,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 109,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "_struct_value_to_image",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "_image_to_struct_value",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 155,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2068,
          "ai_signals": []
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 179,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 180,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4222,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 186,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.218,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_form_context",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 215,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 221,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4222,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_comparison_class",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 269,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 273,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4222,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0722,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 29,
        "avg_function_length": 7.52,
        "function_length_stddev": 5.88,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 25,
        "code_lines": 271,
        "comment_ratio": 0.0845,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 8.21,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.04797,
        "structural_uniformity": 0.2181,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.3,
        "mechanical": 86.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\image_operations.py",
      "language": "python",
      "line_count": 434,
      "token_estimate": 3353,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 16,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4056,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "clone",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "resize",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_feature_store",
              "severity": "medium",
              "line": 56,
              "description": "Features computed ad-hoc for training and inference -- inconsistency between environments",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3472,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "crop",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "transform_vector",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "untransform_vector",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "get_rect",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "_check_size",
          "type": "decorated_definition",
          "line_start": 121,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2222,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 90,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 170,
              "description": "Function is 90 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 90 lines (> 30 dynamic threshold)",
                "impact": "Function run is 90 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 269,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 269,
              "description": "Function is 37 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 37 lines (> 30 dynamic threshold)",
                "impact": "Function run is 37 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1502,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 371,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 385,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 401,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 407,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 429,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0556,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 32,
        "avg_function_length": 10.78,
        "function_length_stddev": 16.72,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 68,
        "code_lines": 366,
        "comment_ratio": 0.1567,
        "comment_what_ratio": 0.2778,
        "naming_avg_length": 6.66,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.016393,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.71,
        "mechanical": 92.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0003_fix_focal_point_fields.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 265,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 32,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.31,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0011_image_collection.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 166,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.97,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0019_delete_filter.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 76,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 15,
        "comment_ratio": 0.0625,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0027_image_description.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 120,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.35,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\shortcuts.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 383,
      "functions": [
        {
          "name": "get_rendition_or_not_found",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 14,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 21,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5271,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.89)"
          ]
        },
        {
          "name": "get_renditions_or_not_found",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 36,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 38,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5271,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.89)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 18.5,
        "function_length_stddev": 2.12,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 17,
        "code_lines": 26,
        "comment_ratio": 0.3953,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.153846,
        "structural_uniformity": 0.8853,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.45,
        "mechanical": 69.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tasks.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 117,
      "functions": [
        {
          "name": "set_image_focal_point_task",
          "type": "decorated_definition",
          "line_start": 5,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 7,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "task()"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 14,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.69,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.210526,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.8,
        "mechanical": 73.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_bulk_actions\\test_bulk_add_tags.py",
      "language": "python",
      "line_count": 85,
      "token_estimate": 665,
      "functions": [
        {
          "name": "get_tag_list",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0526,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2192,
          "ai_signals": []
        },
        {
          "name": "test_add_tags_with_limited_permissions",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 52,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4026,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4026,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_tags",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 81,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3442,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 13.2,
        "function_length_stddev": 9.73,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 81,
        "comment_ratio": 0.0471,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.65,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.08642,
        "structural_uniformity": 0.2628,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.63,
        "mechanical": 73.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_models.py",
      "language": "python",
      "line_count": 1636,
      "token_estimate": 15554,
      "functions": [
        {
          "name": "_open",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_image_model_at_import_time",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_is_portrait",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_is_landscape",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_rect",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_focal_point",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 97,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 98,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_focal_point",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 109,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 110,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_set_focal_point",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_is_stored_locally",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_is_stored_locally_with_external_storage",
          "type": "decorated_definition",
          "line_start": 137,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_reopen_based_on_storage_that_is_dynamically_set",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        DEFAULT_FILE_STORAGE=\"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n    )"
          ]
        },
        {
          "name": "test_get_file_size",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_file_size_on_missing_file_raises_sourceimageioerror",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_file_hash",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_suggested_focal_point_svg",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_default_with_description",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_default_without_description",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_search_method",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 220,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 220,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 223,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 223,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_autocomplete_method",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 233,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 236,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_operators",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 249,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 249,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 252,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 252,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_ordering",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 266,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 270,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_indexing_prefetches_tags",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 276,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 281,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 303,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 317,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3285,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_administrator_can_edit",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_editor_can_edit",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_owner_can_edit",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_user_cant_edit",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_single",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_flat",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_pipe",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "transformers_pipeline_single_item",
              "severity": "medium",
              "line": 348,
              "description": "Pipeline called in loop with single items -- not batching, wastes GPU throughput",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_spec_list",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_braced",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_mixed",
          "type": "function_definition",
          "line_start": 364,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_expand_spec_mixed_pipe",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "transformers_pipeline_single_item",
              "severity": "medium",
              "line": 370,
              "description": "Pipeline called in loop with single items -- not batching, wastes GPU throughput",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_spec_multiple_braces",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 389,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_construct_empty",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_construct_with_renditions",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_evaluate_value",
          "type": "function_definition",
          "line_start": 407,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_compare_value",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_width_srcset",
          "type": "function_definition",
          "line_start": 425,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_width_srcset_single_rendition",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 463,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 464,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4346,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_render_single_image_same_as_img_tag",
          "type": "function_definition",
          "line_start": 469,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 481,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_formats",
          "type": "function_definition",
          "line_start": 483,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_single_format",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_mixed_format",
          "type": "function_definition",
          "line_start": 498,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_fallback_format",
          "type": "function_definition",
          "line_start": 513,
          "line_end": 526,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 525,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3664,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_render_multi_format_sizes",
          "type": "function_definition",
          "line_start": 528,
          "line_end": 557,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 546,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 552,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 553,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_single_image_same_as_img_tag",
          "type": "function_definition",
          "line_start": 559,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 572,
          "line_end": 581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_rendition_model",
          "type": "function_definition",
          "line_start": 583,
          "line_end": 584,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 583,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 583,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 584,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 584,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_stock_rendition_contains_unique_together_constraint",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_custom_rendition_may_have_unique_constraint",
          "type": "function_definition",
          "line_start": 589,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_custom_rendition_without_unique_constraint_raises_error",
          "type": "function_definition",
          "line_start": 592,
          "line_end": 615,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_minification",
          "type": "function_definition",
          "line_start": 617,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_resize_to_max",
          "type": "function_definition",
          "line_start": 628,
          "line_end": 633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_resize_to_min",
          "type": "function_definition",
          "line_start": 635,
          "line_end": 640,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_resize_to_original",
          "type": "function_definition",
          "line_start": 642,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_cache",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_with_filter_instance",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 663,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_prefetched_rendition_found",
          "type": "function_definition",
          "line_start": 665,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_prefetch_renditions_found",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 690,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_prefetched_rendition_not_found",
          "type": "function_definition",
          "line_start": 692,
          "line_end": 718,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_prefetch_renditions_not_found",
          "type": "function_definition",
          "line_start": 720,
          "line_end": 735,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_renditions_with_filter_instance",
          "type": "function_definition",
          "line_start": 737,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_renditions_key_order",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "_test_get_renditions_performance",
          "type": "function_definition",
          "line_start": 752,
          "line_end": 766,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 754,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 755,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 756,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_renditions_performance_with_rendition_caching_disabled",
          "type": "function_definition",
          "line_start": 768,
          "line_end": 785,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_get_renditions_performance_with_rendition_caching_enabled",
          "type": "decorated_definition",
          "line_start": 787,
          "line_end": 810,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\n            \"renditions\": {\n                \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_create_renditions",
          "type": "function_definition",
          "line_start": 812,
          "line_end": 859,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 820,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 835,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 812,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_renditions is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3352,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_alt_attribute",
          "type": "function_definition",
          "line_start": 861,
          "line_end": 863,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_full_url",
          "type": "function_definition",
          "line_start": 865,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 869,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 869,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_renditions_cache",
          "type": "decorated_definition",
          "line_start": 871,
          "line_end": 919,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 871,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_renditions_cache is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1878,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\n            \"renditions\": {\n                \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_prefers_rendition_cache_backend",
          "type": "function_definition",
          "line_start": 921,
          "line_end": 932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_uses_default_cache_when_no_renditions_cache",
          "type": "function_definition",
          "line_start": 934,
          "line_end": 942,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_focal_point",
          "type": "function_definition",
          "line_start": 944,
          "line_end": 966,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 947,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 948,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4208,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_background_position_style_default",
          "type": "function_definition",
          "line_start": 968,
          "line_end": 978,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_rendition_storage_setting_absent",
          "type": "decorated_definition",
          "line_start": 980,
          "line_end": 984,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings()"
          ]
        },
        {
          "name": "test_rendition_storage_setting_given_dotted_path",
          "type": "decorated_definition",
          "line_start": 986,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_RENDITION_STORAGE=\"wagtail.images.tests.test_models.CustomStorage\"\n    )"
          ]
        },
        {
          "name": "test_rendition_storage_setting_given_storage_instance",
          "type": "decorated_definition",
          "line_start": 992,
          "line_end": 996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_RENDITION_STORAGE=CustomStorage())"
          ]
        },
        {
          "name": "test_rendition_storage_setting_given_storage_alias",
          "type": "decorated_definition",
          "line_start": 998,
          "line_end": 1015,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            \"default\": {\n                \"BACKEND\": \"django.core.files.storage.FileSystemStorage\",\n            },\n            \"staticfiles\": {\n                \"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\",\n            },\n            \"custom_storage\": {\n                \"BACKEND\": \"wagtail.images.tests.test_models.CustomStorage\",\n            },\n        },\n        WAGTAILIMAGES_RENDITION_STORAGE=\"custom_storage\",\n    )"
          ]
        },
        {
          "name": "test_image_get_rendition_preserve_svg",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1017,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1017,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1019,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1019,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1021,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1021,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1029,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1029,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1034,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1034,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1042,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1042,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1044,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1044,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_svg_get_rendition_preserve_svg",
          "type": "function_definition",
          "line_start": 1046,
          "line_end": 1075,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1046,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1046,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1049,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1049,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1053,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1053,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1055,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1055,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1061,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1061,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1065,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1065,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1069,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1069,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1070,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1070,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1073,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1073,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_get_renditions_preserve_svg",
          "type": "function_definition",
          "line_start": 1077,
          "line_end": 1101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1077,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1077,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1079,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1079,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1080,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1080,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1089,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1089,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_svg_get_renditions_preserve_svg",
          "type": "function_definition",
          "line_start": 1103,
          "line_end": 1116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1103,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1103,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1105,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1105,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1106,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1106,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1125,
          "line_end": 1145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1130,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 1135,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4498,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_prefetch_renditions_on_non_image_querysets",
          "type": "function_definition",
          "line_start": 1147,
          "line_end": 1174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1180,
          "line_end": 1184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_unused_image_usage_count",
          "type": "function_definition",
          "line_start": 1186,
          "line_end": 1187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_used_image_document_usage_count",
          "type": "function_definition",
          "line_start": 1189,
          "line_end": 1196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1202,
          "line_end": 1206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_unused_image_get_usage",
          "type": "function_definition",
          "line_start": 1208,
          "line_end": 1209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_used_image_document_get_usage",
          "type": "function_definition",
          "line_start": 1211,
          "line_end": 1222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1228,
          "line_end": 1232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_willow_image_object_returned",
          "type": "function_definition",
          "line_start": 1234,
          "line_end": 1236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_with_missing_image",
          "type": "function_definition",
          "line_start": 1238,
          "line_end": 1246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_closes_image",
          "type": "function_definition",
          "line_start": 1248,
          "line_end": 1253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_closes_image_on_exception",
          "type": "function_definition",
          "line_start": 1255,
          "line_end": 1264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1261,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_doesnt_close_open_image",
          "type": "function_definition",
          "line_start": 1266,
          "line_end": 1275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_issue_573",
          "type": "function_definition",
          "line_start": 1284,
          "line_end": 1299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1293,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1294,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1303,
          "line_end": 1314,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1313,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4081,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "add_image",
          "type": "function_definition",
          "line_start": 1316,
          "line_end": 1338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "edit_image",
          "type": "function_definition",
          "line_start": 1340,
          "line_end": 1362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_issue_613_on_add",
          "type": "function_definition",
          "line_start": 1364,
          "line_end": 1390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1364,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1386,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1386,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4664,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_issue_613_on_edit",
          "type": "function_definition",
          "line_start": 1392,
          "line_end": 1418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1414,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1414,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3757,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "test_duplicate_renditions",
          "type": "function_definition",
          "line_start": 1422,
          "line_end": 1443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_filename_reduction_no_ext",
          "type": "function_definition",
          "line_start": 1452,
          "line_end": 1466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_filename_reduction_ext",
          "type": "function_definition",
          "line_start": 1469,
          "line_end": 1482,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "assert_orientation_landscape_image_is_correct",
          "type": "function_definition",
          "line_start": 1497,
          "line_end": 1520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_1",
          "type": "function_definition",
          "line_start": 1522,
          "line_end": 1534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_2",
          "type": "function_definition",
          "line_start": 1536,
          "line_end": 1548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_3",
          "type": "function_definition",
          "line_start": 1550,
          "line_end": 1562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_4",
          "type": "function_definition",
          "line_start": 1564,
          "line_end": 1576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_5",
          "type": "function_definition",
          "line_start": 1581,
          "line_end": 1593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_6",
          "type": "function_definition",
          "line_start": 1595,
          "line_end": 1607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_7",
          "type": "function_definition",
          "line_start": 1609,
          "line_end": 1621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_with_orientation_8",
          "type": "function_definition",
          "line_start": 1623,
          "line_end": 1635,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1164,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 120,
        "avg_function_length": 11.46,
        "function_length_stddev": 9.1,
        "import_count": 26,
        "export_count": 0,
        "comment_lines": 1167,
        "code_lines": 469,
        "comment_ratio": 0.7133,
        "comment_what_ratio": 0.3763,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 100,
        "ai_smell_density": 0.21322,
        "structural_uniformity": 0.2058,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.47,
        "mechanical": 73.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\urls.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 295,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 38,
        "comment_ratio": 0.0256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.51,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\bulk_actions\\delete.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 344,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1066,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4566,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1066,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 32,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4566,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 4.75,
        "function_length_stddev": 2.22,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 38,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.58,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.078947,
        "structural_uniformity": 0.5332,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.26,
        "mechanical": 80.26,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\jinja2tags.py",
      "language": "python",
      "line_count": 86,
      "token_estimate": 642,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0895,
          "ai_signals": []
        },
        {
          "name": "parse",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0895,
          "ai_signals": []
        },
        {
          "name": "parse_include_block",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0895,
          "ai_signals": []
        },
        {
          "name": "_include_block",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 74,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3229,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 15,
        "function_length_stddev": 8.29,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 82,
        "comment_ratio": 0.0465,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.012195,
        "structural_uniformity": 0.4476,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.08,
        "mechanical": 90.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locks.py",
      "language": "python",
      "line_count": 264,
      "token_estimate": 2459,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "for_user",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_message",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_icon",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_locked_by",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_context_for_user",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "for_user",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_message",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 84,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function get_message is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1046,
          "ai_signals": []
        },
        {
          "name": "get_locked_by",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "for_user",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_message",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_icon",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_locked_by",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_context_for_user",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "for_user",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_message",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_locked_by",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 22,
        "avg_function_length": 9.14,
        "function_length_stddev": 9.5,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 54,
        "code_lines": 210,
        "comment_ratio": 0.2045,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 6.89,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.004762,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.97,
        "mechanical": 95.97,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\publish_scheduled.py",
      "language": "python",
      "line_count": 118,
      "token_estimate": 1169,
      "functions": [
        {
          "name": "revision_date_expired",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 15,
            "max_nesting_depth": 5,
            "parameter_count": 2,
            "line_count": 89,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 69,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 100,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 114,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 29,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 29 in handle makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 29,
              "description": "Function is 89 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 89 lines (> 15 dynamic threshold)",
                "impact": "Function handle is 89 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4071,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 35.33,
        "function_length_stddev": 46.48,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 111,
        "comment_ratio": 0.0593,
        "comment_what_ratio": 0.2857,
        "naming_avg_length": 6.69,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.09009,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 50.55,
        "mechanical": 50.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0001_squashed_0016_change_page_url_path_to_text_field.py",
      "language": "python",
      "line_count": 497,
      "token_estimate": 4400,
      "functions": [
        {
          "name": "initial_data",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 77,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 11,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 11,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 12,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 12,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 13,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 13,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 17,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4343,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_initial_data",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 95,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2365,
          "ai_signals": []
        },
        {
          "name": "set_page_path_collation",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0843,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 38,
        "function_length_stddev": 34.07,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 35,
        "code_lines": 462,
        "comment_ratio": 0.0704,
        "comment_what_ratio": 0.3182,
        "naming_avg_length": 7.57,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.025974,
        "structural_uniformity": 0.1033,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.27,
        "mechanical": 83.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0009_remove_auto_now_add_from_pagerevision_created_at.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 89,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0017_change_edit_page_permission_description.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 186,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 27,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0024_collection.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 266,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 35,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0032_add_bulk_delete_page_permission.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 206,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.02,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0040_page_draft_title.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 177,
      "functions": [
        {
          "name": "draft_title",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.77,
        "mechanical": 80.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0048_add_default_workflows.py",
      "language": "python",
      "line_count": 96,
      "token_estimate": 925,
      "functions": [
        {
          "name": "ancestor_of_q",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1333,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "create_default_workflows",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 17,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 20,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 20,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 23,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 23,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4833,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 38.5,
        "function_length_stddev": 47.38,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 87,
        "comment_ratio": 0.0938,
        "comment_what_ratio": 0.6667,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.206897,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 58.45,
        "mechanical": 58.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0056_page_locale_fields_populate.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 85,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0064_log_timestamp_indexes.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 157,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.44,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0072_alter_revision_content_type_notnull.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 238,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 33,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0080_generic_workflowstate.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 545,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 69,
        "comment_ratio": 0.0143,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.56,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0088_fix_log_entry_json_timestamps.py",
      "language": "python",
      "line_count": 176,
      "token_estimate": 1649,
      "functions": [
        {
          "name": "legacy_to_iso_format",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "iso_to_legacy_format",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "migrate_logs_with_created_only",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 48,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 57,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2561,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "migrate_schedule_logs",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 86,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 94,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 99,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 109,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 117,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3982,
          "ai_signals": [
            "High anti-pattern density (0.96)"
          ]
        },
        {
          "name": "migrate_custom_to_iso_format",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 125,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 125,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 126,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 126,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4117,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "migrate_iso_to_custom_format",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 136,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 136,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 137,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 137,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4117,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 20,
        "function_length_stddev": 19.29,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 154,
        "comment_ratio": 0.125,
        "comment_what_ratio": 0.2727,
        "naming_avg_length": 7.72,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.097403,
        "structural_uniformity": 0.0356,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.23,
        "mechanical": 66.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0096_referenceindex_referenceindex_source_object_and_more.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 194,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 28,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\draft_state.py",
      "language": "python",
      "line_count": 198,
      "token_estimate": 1664,
      "functions": [
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 48,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_check_revision_mixin",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 68,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2712,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "approved_schedule",
          "type": "decorated_definition",
          "line_start": 73,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "status_string",
          "type": "decorated_definition",
          "line_start": 77,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "publish",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        },
        {
          "name": "unpublish",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        },
        {
          "name": "with_content_json",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 142,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 142,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 151,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 151,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4154,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_latest_revision_as_object",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        },
        {
          "name": "scheduled_revision",
          "type": "decorated_definition",
          "line_start": 175,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_scheduled_revision_as_object",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        },
        {
          "name": "_update_from_revision",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        },
        {
          "name": "get_lock",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0654,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 11.58,
        "function_length_stddev": 7.8,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 162,
        "comment_ratio": 0.1818,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.030864,
        "structural_uniformity": 0.3268,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.23,
        "mechanical": 90.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\reference_index.py",
      "language": "python",
      "line_count": 907,
      "token_estimate": 9064,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2104,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "_count",
          "type": "decorated_definition",
          "line_start": 64,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_protected",
          "type": "decorated_definition",
          "line_start": 75,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "count",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "group_by_source_object",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "group_by_source_object_in_bulk",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": []
        },
        {
          "name": "_get_base_content_type",
          "type": "decorated_definition",
          "line_start": 219,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 231,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 235,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "model_is_indexable",
          "type": "decorated_definition",
          "line_start": 239,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 260,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 279,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 239,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function model_is_indexable is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2449,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "register_model",
          "type": "decorated_definition",
          "line_start": 288,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 289,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 289,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 289,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 289,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 289,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 289,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 289,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 297,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 298,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 298,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 298,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 298,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 298,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_register_as_tracked_model",
          "type": "decorated_definition",
          "line_start": 300,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 301,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 301,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 301,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 301,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 301,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 313,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 314,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 314,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 316,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 321,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 321,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 321,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 321,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 321,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "is_indexed",
          "type": "decorated_definition",
          "line_start": 323,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_extract_references_from_object",
          "type": "decorated_definition",
          "line_start": 327,
          "line_end": 432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 106,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 352,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 417,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 421,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 327,
              "description": "Function is 106 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 106 lines (> 37 dynamic threshold)",
                "impact": "Function _extract_references_from_object is 106 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1582,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_get_content_path_hash",
          "type": "decorated_definition",
          "line_start": 434,
          "line_end": 450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "create_or_update_for_object",
          "type": "decorated_definition",
          "line_start": 452,
          "line_end": 550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 99,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 475,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 475,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 532,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 452,
              "description": "Function is 99 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 99 lines (> 37 dynamic threshold)",
                "impact": "Function create_or_update_for_object is 99 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1676,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "remove_for_object",
          "type": "decorated_definition",
          "line_start": 552,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "remove_references_to",
          "type": "decorated_definition",
          "line_start": 567,
          "line_end": 580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_references_for_object",
          "type": "decorated_definition",
          "line_start": 582,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_references_to",
          "type": "decorated_definition",
          "line_start": 598,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_references_to_in_bulk",
          "type": "decorated_definition",
          "line_start": 614,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 642,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 644,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.232,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_count_references_to_in_bulk",
          "type": "decorated_definition",
          "line_start": 649,
          "line_end": 663,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 656,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2595,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_grouped_references_to",
          "type": "decorated_definition",
          "line_start": 665,
          "line_end": 677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_grouped_references_to_in_bulk",
          "type": "decorated_definition",
          "line_start": 679,
          "line_end": 699,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "usage_count_subquery",
          "type": "decorated_definition",
          "line_start": 701,
          "line_end": 716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 702,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 702,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 704,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 706,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 706,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_content_type",
          "type": "decorated_definition",
          "line_start": 718,
          "line_end": 723,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 725,
          "line_end": 738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "related_field_model_name",
          "type": "decorated_definition",
          "line_start": 740,
          "line_end": 745,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "on_delete",
          "type": "decorated_definition",
          "line_start": 747,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 751,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "model_path_components",
          "type": "decorated_definition",
          "line_start": 756,
          "line_end": 759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "source_field",
          "type": "decorated_definition",
          "line_start": 761,
          "line_end": 787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 779,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1558,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "related_field",
          "type": "decorated_definition",
          "line_start": 789,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "reverse_related_field",
          "type": "decorated_definition",
          "line_start": 809,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0262,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "describe_source_field",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 857,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 819,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 830,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 835,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 838,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 839,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 841,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 846,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 847,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 849,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 853,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 815,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function describe_source_field is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "describe_on_delete",
          "type": "function_definition",
          "line_start": 859,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 859,
              "description": "Function is 40 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 30 dynamic threshold)",
                "impact": "Function describe_on_delete is 40 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1137,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 36,
        "avg_function_length": 20.14,
        "function_length_stddev": 23.21,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 313,
        "code_lines": 594,
        "comment_ratio": 0.3451,
        "comment_what_ratio": 0.1308,
        "naming_avg_length": 7.46,
        "debug_artifacts": [],
        "ai_smell_count": 63,
        "ai_smell_density": 0.106061,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.4,
        "mechanical": 70.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permission_policies\\collections.py",
      "language": "python",
      "line_count": 490,
      "token_estimate": 5160,
      "functions": [
        {
          "name": "_get_user_permission_objects_for_actions",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "get_all_permissions_for_user",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_check_perm",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_collections_with_perm",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 72,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3173,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "_users_with_perm_filter",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "_users_with_perm",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 109,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 109,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "collections_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "collections_user_has_permission_for",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "check_model",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 222,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 222,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 223,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 223,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 254,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 258,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 263,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 263,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 275,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 282,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4007,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 297,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 292,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function instances_user_has_any_permission_for is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2468,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 337,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 352,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 352,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 357,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 357,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4173,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "collections_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 368,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 372,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3007,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "_descendants_with_perm",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 426,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 418,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1734,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 428,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 435,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 470,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 488,
          "line_end": 489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0673,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 33,
        "avg_function_length": 12.64,
        "function_length_stddev": 9.45,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 167,
        "code_lines": 323,
        "comment_ratio": 0.3408,
        "comment_what_ratio": 0.0847,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 23,
        "ai_smell_density": 0.071207,
        "structural_uniformity": 0.2519,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.33,
        "mechanical": 77.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\rich_text\\pages.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 335,
      "functions": [
        {
          "name": "get_model",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 12,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 12,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4597,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_many",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1097,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 24,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1097,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "expand_db_attributes_many",
          "type": "decorated_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1097,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "extract_references",
          "type": "decorated_definition",
          "line_start": 35,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1097,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 4.8,
        "function_length_stddev": 2.17,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 36,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.38,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.055556,
        "structural_uniformity": 0.5483,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.11,
        "mechanical": 86.11,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\sqlite\\query.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 17,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\opensearch3.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 258,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 19.39,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0003_remove_editors_pick.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 180,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 11,
        "comment_ratio": 0.3529,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.81,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\models.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 424,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 29,
        "comment_ratio": 0.383,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\signals.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 404,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 47,
        "comment_ratio": 0.3733,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\action_menu.py",
      "language": "python",
      "line_count": 355,
      "token_estimate": 2936,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.14,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 131,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3043,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 142,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_base_snippet_action_menu_items",
          "type": "decorated_definition",
          "line_start": 241,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 264,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1207,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 5,
            "parameter_count": 2,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 302,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 302,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 310,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 314,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 322,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 327,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 275,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 275 in __init__ makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 275,
              "description": "Function is 54 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 54 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 330,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 349,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 352,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 12.55,
        "function_length_stddev": 12.64,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 17,
        "code_lines": 338,
        "comment_ratio": 0.0479,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.19,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.044379,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.29,
        "mechanical": 83.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\side_panels.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 170,
      "functions": [
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0225,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 17,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.35,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.9,
        "mechanical": 97.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_chooser_views.py",
      "language": "python",
      "line_count": 378,
      "token_estimate": 3329,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 33,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 39,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 44,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 44,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_results",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 50,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 51,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 51,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 52,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 63,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_pagination",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 69,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_searchable",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_locale_filter_requires_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 78,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 89,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 89,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 90,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 91,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_filter_by_locale",
          "type": "decorated_definition",
          "line_start": 93,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 104,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 104,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 105,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 106,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 109,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 116,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 117,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 133,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_results",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 138,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 149,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_choose_view_shows_status_column",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 164,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 164,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_choose_results_view_shows_status_column",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 176,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 177,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 179,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 206,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 209,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_is_searchable",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_search_hello",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 222,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_world",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 231,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_partial_match",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 240,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 265,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_search_hello",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 280,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4882,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_choose_a_page",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 300,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 300,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 300,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 300,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_choose_a_non_existing_page",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 314,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 322,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 323,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 324,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 331,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 335,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 344,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_choose_a_page",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 355,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 355,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 355,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 355,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": []
        },
        {
          "name": "test_choose_a_page",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 376,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 376,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 376,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 376,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.52,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 42,
        "avg_function_length": 6.57,
        "function_length_stddev": 4.27,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 352,
        "comment_ratio": 0.0688,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.53,
        "debug_artifacts": [],
        "ai_smell_count": 55,
        "ai_smell_density": 0.15625,
        "structural_uniformity": 0.3499,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.67,
        "mechanical": 74.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_index_view.py",
      "language": "python",
      "line_count": 106,
      "token_estimate": 1011,
      "functions": [
        {
          "name": "test_default_lists_all_snippets_without_menu_items",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "test_setting_allows_listing_of_all_snippet_models",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILSNIPPETS_MENU_SHOW_ALL=True)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "test_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3497,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_with_only_view_permissions",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 53,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 63,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 64,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 72,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 75,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_displays_snippet",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "test_snippets_menu_item_shown_with_only_view_permission",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 88,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 91,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 103,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 9,
        "function_length_stddev": 7.58,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 104,
        "comment_ratio": 0.0189,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.74,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.105769,
        "structural_uniformity": 0.1575,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_snippet_models.py",
      "language": "python",
      "line_count": 113,
      "token_estimate": 1043,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 23,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5078,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_listing_respects_model_ordering",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 33,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5078,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chooser_respects_model_ordering",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 40,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5078,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_function",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "test_register_decorator",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "test_snippets_ordering",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "test_standard_edit_handler",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "test_fancy_edit_handler",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        },
        {
          "name": "test_model_with_single_tabbed_panel_only",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1578,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 6.64,
        "function_length_stddev": 4.72,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 107,
        "comment_ratio": 0.0531,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 9.45,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.028037,
        "structural_uniformity": 0.2891,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.49,
        "mechanical": 92.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\views\\snippets.py",
      "language": "python",
      "line_count": 1275,
      "token_estimate": 11752,
      "functions": [
        {
          "name": "get_snippet_model_from_url_params",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 61,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_snippet_models_for_index_view",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "_get_snippet_types",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_list_url",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 123,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_get_title_column",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_list_buttons",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 197,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 200,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 215,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 191,
              "description": "Function is 40 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 30 dynamic threshold)",
                "impact": "Function get_list_buttons is 40 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 242,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3046,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "_get_action_menu",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 284,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 286,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 310,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3046,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "_get_action_menu",
          "type": "function_definition",
          "line_start": 328,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 336,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "permission_required",
          "type": "decorated_definition",
          "line_start": 493,
          "line_end": 497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 612,
          "line_end": 632,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 621,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1796,
          "ai_signals": []
        },
        {
          "name": "url_prefix",
          "type": "decorated_definition",
          "line_start": 634,
          "line_end": 638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 635,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 636,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 637,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 637,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "url_namespace",
          "type": "decorated_definition",
          "line_start": 640,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 644,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 644,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "revisions_revert_view_class",
          "type": "decorated_definition",
          "line_start": 647,
          "line_end": 662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "permission_policy",
          "type": "decorated_definition",
          "line_start": 664,
          "line_end": 666,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_index_view_kwargs",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_add_view_kwargs",
          "type": "function_definition",
          "line_start": 693,
          "line_end": 697,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_copy_view_kwargs",
          "type": "function_definition",
          "line_start": 699,
          "line_end": 700,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_edit_view_kwargs",
          "type": "function_definition",
          "line_start": 702,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "revisions_view",
          "type": "decorated_definition",
          "line_start": 712,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "revisions_revert_view",
          "type": "decorated_definition",
          "line_start": 716,
          "line_end": 721,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "revisions_compare_view",
          "type": "decorated_definition",
          "line_start": 723,
          "line_end": 732,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "revisions_unschedule_view",
          "type": "decorated_definition",
          "line_start": 734,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "unpublish_view",
          "type": "decorated_definition",
          "line_start": 744,
          "line_end": 751,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "preview_on_add_view",
          "type": "decorated_definition",
          "line_start": 753,
          "line_end": 758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "preview_on_edit_view",
          "type": "decorated_definition",
          "line_start": 760,
          "line_end": 765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "lock_view",
          "type": "decorated_definition",
          "line_start": 767,
          "line_end": 772,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "copy_view",
          "type": "decorated_definition",
          "line_start": 774,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "unlock_view",
          "type": "decorated_definition",
          "line_start": 778,
          "line_end": 783,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "workflow_action_view",
          "type": "decorated_definition",
          "line_start": 785,
          "line_end": 791,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "collect_workflow_action_data_view",
          "type": "decorated_definition",
          "line_start": 793,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "confirm_workflow_cancellation_view",
          "type": "decorated_definition",
          "line_start": 801,
          "line_end": 803,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "workflow_preview_view",
          "type": "decorated_definition",
          "line_start": 805,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "workflow_history_view",
          "type": "decorated_definition",
          "line_start": 809,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "workflow_history_detail_view",
          "type": "decorated_definition",
          "line_start": 822,
          "line_end": 831,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "chooser_viewset",
          "type": "decorated_definition",
          "line_start": 833,
          "line_end": 841,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 838,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "icon",
          "type": "decorated_definition",
          "line_start": 843,
          "line_end": 845,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_icon",
          "type": "function_definition",
          "line_start": 847,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "menu_label",
          "type": "decorated_definition",
          "line_start": 855,
          "line_end": 857,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 856,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 857,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_menu_label",
          "type": "function_definition",
          "line_start": 859,
          "line_end": 865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 859,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 861,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 863,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "menu_name",
          "type": "decorated_definition",
          "line_start": 867,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_menu_name",
          "type": "function_definition",
          "line_start": 871,
          "line_end": 877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "menu_icon",
          "type": "decorated_definition",
          "line_start": 879,
          "line_end": 881,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_menu_icon",
          "type": "function_definition",
          "line_start": 883,
          "line_end": 889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "menu_order",
          "type": "decorated_definition",
          "line_start": 891,
          "line_end": 893,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_menu_order",
          "type": "function_definition",
          "line_start": 895,
          "line_end": 902,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_menu_item_is_registered",
          "type": "function_definition",
          "line_start": 904,
          "line_end": 905,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "breadcrumbs_items",
          "type": "decorated_definition",
          "line_start": 907,
          "line_end": 923,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 912,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 920,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 925,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "index_template_name",
          "type": "decorated_definition",
          "line_start": 933,
          "line_end": 935,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_index_template",
          "type": "function_definition",
          "line_start": 937,
          "line_end": 945,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "index_results_template_name",
          "type": "decorated_definition",
          "line_start": 947,
          "line_end": 949,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 948,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 949,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_index_results_template",
          "type": "function_definition",
          "line_start": 951,
          "line_end": 959,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 951,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 954,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 957,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_template_name",
          "type": "decorated_definition",
          "line_start": 961,
          "line_end": 963,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_create_template",
          "type": "function_definition",
          "line_start": 965,
          "line_end": 973,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "edit_template_name",
          "type": "decorated_definition",
          "line_start": 975,
          "line_end": 977,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_edit_template",
          "type": "function_definition",
          "line_start": 979,
          "line_end": 987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "delete_template_name",
          "type": "decorated_definition",
          "line_start": 989,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_delete_template",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 1001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "history_template_name",
          "type": "decorated_definition",
          "line_start": 1003,
          "line_end": 1013,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1008,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1009,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1009,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1010,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_history_template",
          "type": "function_definition",
          "line_start": 1015,
          "line_end": 1023,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "inspect_template_name",
          "type": "decorated_definition",
          "line_start": 1025,
          "line_end": 1035,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1030,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1031,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1031,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1032,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_inspect_template",
          "type": "function_definition",
          "line_start": 1037,
          "line_end": 1047,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "get_admin_url_namespace",
          "type": "function_definition",
          "line_start": 1049,
          "line_end": 1057,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1057,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_admin_base_path",
          "type": "function_definition",
          "line_start": 1059,
          "line_end": 1068,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1064,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1068,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_chooser_admin_url_namespace",
          "type": "function_definition",
          "line_start": 1070,
          "line_end": 1074,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1074,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_chooser_admin_base_path",
          "type": "function_definition",
          "line_start": 1076,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1083,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "url_finder_class",
          "type": "decorated_definition",
          "line_start": 1085,
          "line_end": 1089,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 1091,
          "line_end": 1208,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 118,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1091,
              "description": "Function is 118 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 118 lines (> 15 dynamic threshold)",
                "impact": "Function get_urlpatterns is 118 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0426,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 1210,
          "line_end": 1224,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1224,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1224,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_chooser_viewset",
          "type": "function_definition",
          "line_start": 1226,
          "line_end": 1227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.013,
          "ai_signals": []
        },
        {
          "name": "register_model_check",
          "type": "function_definition",
          "line_start": 1229,
          "line_end": 1233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 1229,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 1229,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 1229,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1231,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1231,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 1233,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 1233,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 1233,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_snippet_model",
          "type": "function_definition",
          "line_start": 1235,
          "line_end": 1242,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1235,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 1235,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 1235,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1235,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 1235,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 1244,
          "line_end": 1251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 1250,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 1250,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 1250,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1251,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 1251,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 1251,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1251,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 1251,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1263,
          "line_end": 1274,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1269,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3046,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 95,
        "avg_function_length": 9.43,
        "function_length_stddev": 12.81,
        "import_count": 31,
        "export_count": 0,
        "comment_lines": 222,
        "code_lines": 1053,
        "comment_ratio": 0.1741,
        "comment_what_ratio": 0.0649,
        "naming_avg_length": 8.51,
        "debug_artifacts": [],
        "ai_smell_count": 70,
        "ai_smell_density": 0.066477,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.99,
        "mechanical": 80.99,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\migrations\\0002_added_file_field.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 83,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\demosite\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 1323,
      "token_estimate": 11566,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 1323,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\earlypage\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 246,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 37,
        "comment_ratio": 0.0263,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.52,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\middleware.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 348,
      "functions": [
        {
          "name": "process_request",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2116,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.89)"
          ]
        },
        {
          "name": "process_view",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 26,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 26,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5616,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.89)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 6.5,
        "function_length_stddev": 0.71,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 26,
        "comment_ratio": 0.1875,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.08,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.8912,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.52,
        "mechanical": 72.52,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\routablepage\\models.py",
      "language": "python",
      "line_count": 91,
      "token_estimate": 810,
      "functions": [
        {
          "name": "routable_page_external_view",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": []
        },
        {
          "name": "archive_for_1984",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^archive/year/1984/$\")"
          ]
        },
        {
          "name": "archive_by_year",
          "type": "decorated_definition",
          "line_start": 18,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^archive/year/(\\d+)/$\")"
          ]
        },
        {
          "name": "archive_by_author",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^archive/author/(?P<author_slug>.+)/$\")"
          ]
        },
        {
          "name": "archive_by_title",
          "type": "decorated_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "path(\"archive/title/<slug:title>/\")"
          ]
        },
        {
          "name": "archive_by_category",
          "type": "decorated_definition",
          "line_start": 30,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "re_path(r\"^archive/category/(?P<category_slug>.+)/$\")"
          ]
        },
        {
          "name": "permanent_homepage_redirect",
          "type": "decorated_definition",
          "line_start": 34,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^permanant-homepage-redirect/$\")"
          ]
        },
        {
          "name": "temporary_homepage_redirect",
          "type": "decorated_definition",
          "line_start": 38,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^temporary-homepage-redirect/$\")"
          ]
        },
        {
          "name": "external_view",
          "type": "decorated_definition",
          "line_start": 42,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^external/(.+)/$\")",
            "route(r\"^external-no-arg/$\")"
          ]
        },
        {
          "name": "override_name_test",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^override-name-test/$\", name=\"name_overridden\")"
          ]
        },
        {
          "name": "render_method_test",
          "type": "decorated_definition",
          "line_start": 53,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^render-method-test/$\")"
          ]
        },
        {
          "name": "render_method_test_custom_template",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^render-method-test-custom-template/$\")"
          ]
        },
        {
          "name": "render_method_test_with_arg",
          "type": "decorated_definition",
          "line_start": 65,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^render-method-with-arg/(?P<slug>.+)/$\")"
          ]
        },
        {
          "name": "get_route_paths",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": []
        },
        {
          "name": "serve_preview",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 81,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 81,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 84,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 84,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5457,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "main",
          "type": "decorated_definition",
          "line_start": 88,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1957,
          "ai_signals": [],
          "decorators": [
            "route(r\"^$\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 3.56,
        "function_length_stddev": 1.26,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 88,
        "comment_ratio": 0.033,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.75,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.045455,
        "structural_uniformity": 0.6454,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.29,
        "mechanical": 88.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0003_fancysnippet_standardsnippet.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 277,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0011_nonautocompletesearchablesnippet.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 205,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\streamfield_migrations\\models.py",
      "language": "python",
      "line_count": 50,
      "token_estimate": 307,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 50,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0001_squashed_0073_revisablechildmodel_secret_text.py",
      "language": "python",
      "line_count": 4210,
      "token_estimate": 37907,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 4209,
        "comment_ratio": 0.0002,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.77,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0009_alter_eventpage_options.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 137,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0017_moderatedmodel.py",
      "language": "python",
      "line_count": 107,
      "token_estimate": 883,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 106,
        "comment_ratio": 0.0093,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.6,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0025_alter_importantpagesgenericsetting_options.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 127,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.87,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0033_customcopyformpage.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 247,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 35,
        "comment_ratio": 0.0278,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0041_alter_jsonstreammodel_options.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 98,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.74,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0049_promotionalpage.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 240,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 35,
        "comment_ratio": 0.0278,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0057_featurecompletetoy_sort_order.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 151,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\urls.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 201,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\form_data.py",
      "language": "python",
      "line_count": 204,
      "token_estimate": 1631,
      "functions": [
        {
          "name": "_nested_form_data",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 23,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 26,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4435,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "nested_form_data",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0935,
          "ai_signals": []
        },
        {
          "name": "streamfield",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0935,
          "ai_signals": []
        },
        {
          "name": "inline_formset",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 80,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function inline_formset is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1695,
          "ai_signals": []
        },
        {
          "name": "rich_text",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0935,
          "ai_signals": []
        },
        {
          "name": "_querydict_from_form",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 14,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 149,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 158,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 168,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 173,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 177,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 147,
              "description": "Function is 40 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 15 dynamic threshold)",
                "impact": "Function _querydict_from_form is 40 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4435,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "querydict_from_html",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 190,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 200,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4435,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 25,
        "function_length_stddev": 13.32,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 79,
        "code_lines": 125,
        "comment_ratio": 0.3873,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.18,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.096,
        "structural_uniformity": 0.4673,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.71,
        "mechanical": 59.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_factories\\options.py",
      "language": "python",
      "line_count": 61,
      "token_estimate": 477,
      "functions": [
        {
          "name": "_build_default_options",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_meta_dict",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "to_meta_class",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "prepare_arguments",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 45,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "get_block_definition",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 9.8,
        "function_length_stddev": 8.26,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 52,
        "comment_ratio": 0.1475,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.75,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.057692,
        "structural_uniformity": 0.1573,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.28,
        "mechanical": 82.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_blocks.py",
      "language": "python",
      "line_count": 7060,
      "token_estimate": 62687,
      "functions": [
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 46,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_block_definition_registry",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 68,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_block_is_previewable",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 88,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 125,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 127,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 153,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 155,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 70,
              "description": "Function is 88 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 88 lines (> 60 dynamic threshold)",
                "impact": "Function test_block_is_previewable is 88 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2612,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_charfield_render",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_block_definition_registry",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 168,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 169,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 171,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_charfield_render_with_template",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_charblock_adapter",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 184,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 191,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 196,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_charblock_adapter_form_classname",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 214,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 220,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_charblock_adapter_attrs",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 232,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2374,
          "ai_signals": []
        },
        {
          "name": "test_charfield_render_with_template_with_extra_context",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_charfield_get_form_state",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_charfield_searchable_content",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_search_index_searchable_content",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_charfield_with_validator",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_required_on_save",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_charfield_with_callable_default",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_choicefield_render",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_custom_choicefield",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 330,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 344,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 348,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 318,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt_custom_choicefield is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 357,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_form_handling_is_independent_of_serialisation",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 377,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 378,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 381,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 382,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_prepare_value_called",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 398,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 403,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 404,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 407,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 408,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 410,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 418,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 421,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 430,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 388,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_prepare_value_called is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type",
          "type": "function_definition",
          "line_start": 443,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_required_error",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 461,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_max_value_validation",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_min_value_validation",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 485,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_required_error",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_format_validation",
          "type": "function_definition",
          "line_start": 505,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 511,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_state",
          "type": "function_definition",
          "line_start": 523,
          "line_end": 528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 530,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 544,
          "line_end": 552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_type",
          "type": "function_definition",
          "line_start": 556,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_required_error",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 571,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 573,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_max_value_validation_error",
          "type": "function_definition",
          "line_start": 577,
          "line_end": 581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_min_value_validation_error",
          "type": "function_definition",
          "line_start": 583,
          "line_end": 587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 589,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_type",
          "type": "function_definition",
          "line_start": 601,
          "line_end": 604,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_type_to_python",
          "type": "function_definition",
          "line_start": 606,
          "line_end": 611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_type_to_python_decimal_none_value",
          "type": "function_definition",
          "line_start": 613,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 618,
          "line_end": 623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_required_error",
          "type": "function_definition",
          "line_start": 625,
          "line_end": 629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 631,
          "line_end": 633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_max_value_validation_error",
          "type": "function_definition",
          "line_start": 635,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_min_value_validation_error",
          "type": "function_definition",
          "line_start": 641,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_round_trip_to_db_preserves_type",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 665,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 657,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 657,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 669,
          "line_end": 674,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_required_error",
          "type": "function_definition",
          "line_start": 676,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_custom_required_error",
          "type": "function_definition",
          "line_start": 688,
          "line_end": 700,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_validation_error",
          "type": "function_definition",
          "line_start": 702,
          "line_end": 708,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_raises_custom_error_message",
          "type": "function_definition",
          "line_start": 710,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_fallback_value",
          "type": "function_definition",
          "line_start": 735,
          "line_end": 738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_default_none",
          "type": "function_definition",
          "line_start": 740,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_empty_string",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 748,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_nonempty_string",
          "type": "function_definition",
          "line_start": 750,
          "line_end": 753,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_localized_string",
          "type": "function_definition",
          "line_start": 755,
          "line_end": 758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_richtext_value",
          "type": "function_definition",
          "line_start": 760,
          "line_end": 765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_callable",
          "type": "function_definition",
          "line_start": 767,
          "line_end": 773,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 775,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 778,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapter",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 789,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 798,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 800,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapter_with_draftail",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 833,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 815,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 822,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 826,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapter_with_max_length",
          "type": "function_definition",
          "line_start": 835,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 841,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 848,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 852,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_validate_required_richtext_block",
          "type": "function_definition",
          "line_start": 862,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_validate_non_required_richtext_block",
          "type": "function_definition",
          "line_start": 872,
          "line_end": 876,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 878,
          "line_end": 886,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_validate_max_length",
          "type": "function_definition",
          "line_start": 888,
          "line_end": 901,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_validate_min_length",
          "type": "function_definition",
          "line_start": 903,
          "line_end": 917,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content",
          "type": "function_definition",
          "line_start": 919,
          "line_end": 932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_search_index_get_searchable_content",
          "type": "function_definition",
          "line_start": 934,
          "line_end": 944,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content_whitespace",
          "type": "function_definition",
          "line_start": 946,
          "line_end": 950,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 952,
          "line_end": 956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize",
          "type": "function_definition",
          "line_start": 958,
          "line_end": 964,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 960,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 968,
          "line_end": 971,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 971,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_choice_block",
          "type": "function_definition",
          "line_start": 973,
          "line_end": 999,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 977,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 988,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 992,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_choice_block_with_default",
          "type": "function_definition",
          "line_start": 1001,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_choice_block_with_callable_choices",
          "type": "function_definition",
          "line_start": 1007,
          "line_end": 1020,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1014,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3124,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_validate_required_choice_block",
          "type": "function_definition",
          "line_start": 1022,
          "line_end": 1033,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 1035,
          "line_end": 1043,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_non_required_choice_block",
          "type": "function_definition",
          "line_start": 1045,
          "line_end": 1053,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1051,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_validate_non_required_choice_block",
          "type": "function_definition",
          "line_start": 1055,
          "line_end": 1065,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_choice_block_with_existing_blank_choice",
          "type": "function_definition",
          "line_start": 1067,
          "line_end": 1079,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1074,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_adapt_choice_block_with_existing_blank_choice_and_with_callable_choices",
          "type": "function_definition",
          "line_start": 1081,
          "line_end": 1095,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1090,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2957,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_named_groups_without_blank_option",
          "type": "function_definition",
          "line_start": 1097,
          "line_end": 1139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1118,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1097,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_named_groups_without_blank_option is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2252,
          "ai_signals": []
        },
        {
          "name": "test_to_python_with_optgroups_preserves_type",
          "type": "function_definition",
          "line_start": 1141,
          "line_end": 1165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1141,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1141,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3424,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_multiple_choice_block_preserves_types",
          "type": "function_definition",
          "line_start": 1167,
          "line_end": 1181,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1167,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1167,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1180,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_choice_block_with_optgroups_preserves_types",
          "type": "function_definition",
          "line_start": 1183,
          "line_end": 1208,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1183,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1183,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1207,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_named_groups_with_blank_option",
          "type": "function_definition",
          "line_start": 1210,
          "line_end": 1255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1233,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1210,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_named_groups_with_blank_option is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2146,
          "ai_signals": []
        },
        {
          "name": "test_subclassing",
          "type": "function_definition",
          "line_start": 1257,
          "line_end": 1289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1267,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 1291,
          "line_end": 1298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_search_index_searchable_content",
          "type": "function_definition",
          "line_start": 1300,
          "line_end": 1308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content_with_callable_choices",
          "type": "function_definition",
          "line_start": 1310,
          "line_end": 1318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_optgroup_searchable_content",
          "type": "function_definition",
          "line_start": 1320,
          "line_end": 1339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_invalid_searchable_content",
          "type": "function_definition",
          "line_start": 1341,
          "line_end": 1348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content_with_lazy_translation",
          "type": "function_definition",
          "line_start": 1350,
          "line_end": 1361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_optgroup_searchable_content_with_lazy_translation",
          "type": "function_definition",
          "line_start": 1363,
          "line_end": 1386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_callable_choices",
          "type": "function_definition",
          "line_start": 1388,
          "line_end": 1419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1398,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1718,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 1421,
          "line_end": 1435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_state",
          "type": "function_definition",
          "line_start": 1437,
          "line_end": 1440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_state_with_radio_widget",
          "type": "function_definition",
          "line_start": 1442,
          "line_end": 1447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_choiceblock_preserves_integer_type",
          "type": "function_definition",
          "line_start": 1449,
          "line_end": 1453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1449,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1449,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_choiceblock_does_not_coerce_string_choices",
          "type": "function_definition",
          "line_start": 1455,
          "line_end": 1459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1463,
          "line_end": 1466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1466,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_multiple_choice_block",
          "type": "function_definition",
          "line_start": 1468,
          "line_end": 1495,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1474,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1484,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1488,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_choice_block_with_default",
          "type": "function_definition",
          "line_start": 1497,
          "line_end": 1501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_multiple_choice_block_with_callable_choices",
          "type": "function_definition",
          "line_start": 1503,
          "line_end": 1515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1510,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_validate_required_multiple_choice_block",
          "type": "function_definition",
          "line_start": 1517,
          "line_end": 1530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 1532,
          "line_end": 1543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_non_required_multiple_choice_block",
          "type": "function_definition",
          "line_start": 1545,
          "line_end": 1553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1551,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_validate_non_required_multiple_choice_block",
          "type": "function_definition",
          "line_start": 1555,
          "line_end": 1565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_multiple_choice_block_with_existing_blank_choice",
          "type": "function_definition",
          "line_start": 1567,
          "line_end": 1579,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1574,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_adapt_multiple_choice_block_with_existing_blank_choice_and_with_callable_choices",
          "type": "function_definition",
          "line_start": 1581,
          "line_end": 1595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1590,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2957,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_named_groups_without_blank_option",
          "type": "function_definition",
          "line_start": 1597,
          "line_end": 1638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1618,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1597,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_named_groups_without_blank_option is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.229,
          "ai_signals": []
        },
        {
          "name": "test_named_groups_with_blank_option",
          "type": "function_definition",
          "line_start": 1640,
          "line_end": 1684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1663,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1640,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_named_groups_with_blank_option is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2179,
          "ai_signals": []
        },
        {
          "name": "test_subclassing",
          "type": "function_definition",
          "line_start": 1686,
          "line_end": 1717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1696,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1718,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 1719,
          "line_end": 1726,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_search_index_searchable_content",
          "type": "function_definition",
          "line_start": 1728,
          "line_end": 1736,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content_with_callable_choices",
          "type": "function_definition",
          "line_start": 1738,
          "line_end": 1746,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_optgroup_searchable_content",
          "type": "function_definition",
          "line_start": 1748,
          "line_end": 1767,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_invalid_searchable_content",
          "type": "function_definition",
          "line_start": 1769,
          "line_end": 1776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content_with_lazy_translation",
          "type": "function_definition",
          "line_start": 1778,
          "line_end": 1789,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_optgroup_searchable_content_with_lazy_translation",
          "type": "function_definition",
          "line_start": 1791,
          "line_end": 1814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_callable_choices",
          "type": "function_definition",
          "line_start": 1816,
          "line_end": 1846,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1826,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1753,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 1848,
          "line_end": 1862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_state",
          "type": "function_definition",
          "line_start": 1864,
          "line_end": 1869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_state_with_checkbox_widget",
          "type": "function_definition",
          "line_start": 1871,
          "line_end": 1877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_fallback_value",
          "type": "function_definition",
          "line_start": 1881,
          "line_end": 1884,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_none",
          "type": "function_definition",
          "line_start": 1886,
          "line_end": 1889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_empty_string",
          "type": "function_definition",
          "line_start": 1891,
          "line_end": 1894,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_nonempty_string",
          "type": "function_definition",
          "line_start": 1896,
          "line_end": 1899,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_callable",
          "type": "function_definition",
          "line_start": 1901,
          "line_end": 1907,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 1909,
          "line_end": 1913,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 1915,
          "line_end": 1919,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 1921,
          "line_end": 1925,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1923,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_form_state",
          "type": "function_definition",
          "line_start": 1927,
          "line_end": 1931,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 1933,
          "line_end": 1956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1937,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1945,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1949,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_response",
          "type": "function_definition",
          "line_start": 1958,
          "line_end": 1964,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1961,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_value_omitted_from_data",
          "type": "function_definition",
          "line_start": 1966,
          "line_end": 1974,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_required_field",
          "type": "function_definition",
          "line_start": 1976,
          "line_end": 1983,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 1985,
          "line_end": 1988,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_nonrequired_field",
          "type": "function_definition",
          "line_start": 1990,
          "line_end": 1998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_validator",
          "type": "function_definition",
          "line_start": 2000,
          "line_end": 2008,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_set_template_with_meta",
          "type": "function_definition",
          "line_start": 2012,
          "line_end": 2018,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_set_template_with_constructor",
          "type": "function_definition",
          "line_start": 2020,
          "line_end": 2022,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_set_template_with_constructor_overrides_meta",
          "type": "function_definition",
          "line_start": 2024,
          "line_end": 2030,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_meta_nested_inheritance",
          "type": "function_definition",
          "line_start": 2032,
          "line_end": 2048,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_meta_multi_inheritance",
          "type": "function_definition",
          "line_start": 2050,
          "line_end": 2082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2059,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2065,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2069,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2080,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2082,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 2086,
          "line_end": 2088,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 2090,
          "line_end": 2118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2099,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3038,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "test_adapt_adjacent_block_groups_with_same_headings",
          "type": "function_definition",
          "line_start": 2120,
          "line_end": 2158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2155,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2120,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt_adjacent_block_groups_with_same_headings is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_initialisation",
          "type": "function_definition",
          "line_start": 2162,
          "line_end": 2170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_from_subclass",
          "type": "function_definition",
          "line_start": 2172,
          "line_end": 2179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_from_subclass_with_extra",
          "type": "function_definition",
          "line_start": 2181,
          "line_end": 2190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_multiple_subclassses",
          "type": "function_definition",
          "line_start": 2192,
          "line_end": 2204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_mixins",
          "type": "function_definition",
          "line_start": 2206,
          "line_end": 2234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 2236,
          "line_end": 2261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_api_representation_calls_same_method_on_fields_with_context",
          "type": "function_definition",
          "line_start": 2263,
          "line_end": 2289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_unknown_field",
          "type": "function_definition",
          "line_start": 2291,
          "line_end": 2313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_bound_block",
          "type": "function_definition",
          "line_start": 2315,
          "line_end": 2331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_form_context",
          "type": "function_definition",
          "line_start": 2333,
          "line_end": 2356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2346,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2356,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.354,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_get_form_context_with_settings",
          "type": "function_definition",
          "line_start": 2358,
          "line_end": 2397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2379,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2358,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_form_context_with_settings is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2374,
          "ai_signals": []
        },
        {
          "name": "test_check_form_template_with_nested_block_groups",
          "type": "function_definition",
          "line_start": 2399,
          "line_end": 2422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 2424,
          "line_end": 2458,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2432,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2438,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2442,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3624,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_adapt_with_form_template",
          "type": "function_definition",
          "line_start": 2460,
          "line_end": 2488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2471,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2476,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2480,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_form_attrs",
          "type": "function_definition",
          "line_start": 2490,
          "line_end": 2512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2503,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2146,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_form_attrs_on_meta",
          "type": "function_definition",
          "line_start": 2514,
          "line_end": 2537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2528,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2082,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_form_template_jinja",
          "type": "function_definition",
          "line_start": 2539,
          "line_end": 2567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2550,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2555,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2559,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_default",
          "type": "function_definition",
          "line_start": 2569,
          "line_end": 2576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_default_with_callable",
          "type": "function_definition",
          "line_start": 2578,
          "line_end": 2595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_help_text_on_meta",
          "type": "function_definition",
          "line_start": 2597,
          "line_end": 2629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2608,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2613,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2617,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3806,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_adapt_with_help_text_as_argument",
          "type": "function_definition",
          "line_start": 2631,
          "line_end": 2660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2639,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2644,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2648,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_collapsed",
          "type": "function_definition",
          "line_start": 2662,
          "line_end": 2675,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2668,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2673,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_list_form_layout",
          "type": "function_definition",
          "line_start": 2677,
          "line_end": 2695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2688,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2466,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_adapt_with_settings_blocks",
          "type": "function_definition",
          "line_start": 2697,
          "line_end": 2719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2711,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2146,
          "ai_signals": []
        },
        {
          "name": "test_with_nested_blockgroups_in_form_layout",
          "type": "function_definition",
          "line_start": 2721,
          "line_end": 2750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2741,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.179,
          "ai_signals": []
        },
        {
          "name": "test_with_missing_blocks_in_form_layout",
          "type": "function_definition",
          "line_start": 2752,
          "line_end": 2784,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2767,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_get_form_layout",
          "type": "function_definition",
          "line_start": 2786,
          "line_end": 2836,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2817,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2818,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2786,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt_with_get_form_layout is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2683,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_adapt_label_format",
          "type": "function_definition",
          "line_start": 2838,
          "line_end": 2851,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2838,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2844,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2845,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2846,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2849,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2851,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 2853,
          "line_end": 2868,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_value_from_datadict",
          "type": "function_definition",
          "line_start": 2870,
          "line_end": 2887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_value_omitted_from_data",
          "type": "function_definition",
          "line_start": 2889,
          "line_end": 2903,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_default_is_returned_as_structvalue",
          "type": "function_definition",
          "line_start": 2905,
          "line_end": 2925,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_default_value_is_distinct_instance",
          "type": "function_definition",
          "line_start": 2927,
          "line_end": 2956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_returns_distinct_default_instances",
          "type": "function_definition",
          "line_start": 2958,
          "line_end": 2983,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 2985,
          "line_end": 3006,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred_propagates_to_child_blocks",
          "type": "function_definition",
          "line_start": 3008,
          "line_end": 3029,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_non_block_validation_error",
          "type": "function_definition",
          "line_start": 3031,
          "line_end": 3061,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 3041,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1753,
          "ai_signals": []
        },
        {
          "name": "test_bound_blocks_are_available_on_template",
          "type": "function_definition",
          "line_start": 3063,
          "line_end": 3071,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3070,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_block_with_extra_context",
          "type": "function_definition",
          "line_start": 3073,
          "line_end": 3077,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3076,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_structvalue",
          "type": "function_definition",
          "line_start": 3079,
          "line_end": 3090,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3085,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3089,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_str_structvalue",
          "type": "function_definition",
          "line_start": 3092,
          "line_end": 3109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_structvalue_with_extra_context",
          "type": "function_definition",
          "line_start": 3111,
          "line_end": 3115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3114,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_structvalue",
          "type": "function_definition",
          "line_start": 3117,
          "line_end": 3128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize_base_cases",
          "type": "function_definition",
          "line_start": 3130,
          "line_end": 3139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_recursive_normalize",
          "type": "function_definition",
          "line_start": 3141,
          "line_end": 3175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation",
          "type": "function_definition",
          "line_start": 3179,
          "line_end": 3229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3179,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_initialisation is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.131,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_from_subclass",
          "type": "function_definition",
          "line_start": 3231,
          "line_end": 3254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_multiple_subclassses",
          "type": "function_definition",
          "line_start": 3256,
          "line_end": 3288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_mixins",
          "type": "function_definition",
          "line_start": 3290,
          "line_end": 3321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_value_property",
          "type": "function_definition",
          "line_start": 3323,
          "line_end": 3339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_with_template",
          "type": "function_definition",
          "line_start": 3341,
          "line_end": 3362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize",
          "type": "function_definition",
          "line_start": 3364,
          "line_end": 3379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize_incorrect_value_class",
          "type": "function_definition",
          "line_start": 3381,
          "line_end": 3400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "assert_eq_list_values",
          "type": "function_definition",
          "line_start": 3404,
          "line_end": 3406,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialise_with_class",
          "type": "function_definition",
          "line_start": 3408,
          "line_end": 3412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialise_with_instance",
          "type": "function_definition",
          "line_start": 3414,
          "line_end": 3418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 3420,
          "line_end": 3437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_uses_ul",
          "type": "function_definition",
          "line_start": 3439,
          "line_end": 3443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_uses_li",
          "type": "function_definition",
          "line_start": 3445,
          "line_end": 3449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_calls_block_render_on_children",
          "type": "function_definition",
          "line_start": 3451,
          "line_end": 3462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_passes_context_to_children",
          "type": "function_definition",
          "line_start": 3464,
          "line_end": 3480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_api_representation_calls_same_method_on_children_with_context",
          "type": "function_definition",
          "line_start": 3482,
          "line_end": 3498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 3500,
          "line_end": 3525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3508,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3516,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 3519,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_min_num_max_num",
          "type": "function_definition",
          "line_start": 3527,
          "line_end": 3554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3535,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3543,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 3546,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 3556,
          "line_end": 3575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_value_omitted_from_data",
          "type": "function_definition",
          "line_start": 3577,
          "line_end": 3598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_id_from_form_submission_is_preserved",
          "type": "function_definition",
          "line_start": 3600,
          "line_end": 3616,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3600,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3600,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3604,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_in_form_submission_uses_order_field",
          "type": "function_definition",
          "line_start": 3618,
          "line_end": 3634,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3623,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2683,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_ordering_in_form_submission_is_numeric",
          "type": "function_definition",
          "line_start": 3636,
          "line_end": 3652,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3641,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2683,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_can_specify_default",
          "type": "function_definition",
          "line_start": 3654,
          "line_end": 3659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_default_callable",
          "type": "function_definition",
          "line_start": 3661,
          "line_end": 3667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_default_default",
          "type": "function_definition",
          "line_start": 3669,
          "line_end": 3680,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3679,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.354,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_default_value_is_distinct_instance",
          "type": "function_definition",
          "line_start": 3682,
          "line_end": 3705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_classname_via_kwarg",
          "type": "function_definition",
          "line_start": 3707,
          "line_end": 3731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3717,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3722,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 3725,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_classname_via_class_meta",
          "type": "function_definition",
          "line_start": 3733,
          "line_end": 3761,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3747,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3752,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 3755,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_form_attrs",
          "type": "function_definition",
          "line_start": 3763,
          "line_end": 3788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3777,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.197,
          "ai_signals": []
        },
        {
          "name": "test_clean_preserves_block_ids",
          "type": "function_definition",
          "line_start": 3790,
          "line_end": 3813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3790,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3790,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.354,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_min_num_validation_errors",
          "type": "function_definition",
          "line_start": 3815,
          "line_end": 3835,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_max_num_validation_errors",
          "type": "function_definition",
          "line_start": 3837,
          "line_end": 3863,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred_propagates_to_child_blocks",
          "type": "function_definition",
          "line_start": 3865,
          "line_end": 3880,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_unpack_old_database_format",
          "type": "function_definition",
          "line_start": 3882,
          "line_end": 3895,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_unpack_old_database_format",
          "type": "function_definition",
          "line_start": 3897,
          "line_end": 3911,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_unpack_new_database_format",
          "type": "function_definition",
          "line_start": 3913,
          "line_end": 3939,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_unpack_new_database_format",
          "type": "function_definition",
          "line_start": 3941,
          "line_end": 3977,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_assign_listblock_with_list",
          "type": "function_definition",
          "line_start": 3979,
          "line_end": 3992,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize_base_case",
          "type": "function_definition",
          "line_start": 3994,
          "line_end": 4005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize_empty",
          "type": "function_definition",
          "line_start": 4007,
          "line_end": 4011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_recursive_normalize",
          "type": "function_definition",
          "line_start": 4013,
          "line_end": 4028,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4025,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2811,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_calls_child_bulk_to_python_when_available",
          "type": "function_definition",
          "line_start": 4034,
          "line_end": 4042,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python",
          "type": "function_definition",
          "line_start": 4044,
          "line_end": 4059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 4061,
          "line_end": 4089,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation",
          "type": "function_definition",
          "line_start": 4093,
          "line_end": 4101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_binary_string_names",
          "type": "function_definition",
          "line_start": 4103,
          "line_end": 4112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_from_subclass",
          "type": "function_definition",
          "line_start": 4114,
          "line_end": 4121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_from_subclass_with_extra",
          "type": "function_definition",
          "line_start": 4123,
          "line_end": 4132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_multiple_subclassses",
          "type": "function_definition",
          "line_start": 4134,
          "line_end": 4146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_initialisation_with_mixins",
          "type": "function_definition",
          "line_start": 4148,
          "line_end": 4177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_field_has_changed",
          "type": "function_definition",
          "line_start": 4179,
          "line_end": 4198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_required_raises_an_exception_if_empty",
          "type": "function_definition",
          "line_start": 4200,
          "line_end": 4209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_required_does_not_raise_an_exception_if_not_empty",
          "type": "function_definition",
          "line_start": 4211,
          "line_end": 4220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 4217,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_required_does_not_raise_an_exception_if_empty",
          "type": "function_definition",
          "line_start": 4222,
          "line_end": 4232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 4229,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3806,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_required_by_default",
          "type": "function_definition",
          "line_start": 4234,
          "line_end": 4243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "render_article",
          "type": "function_definition",
          "line_start": 4245,
          "line_end": 4253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_api_representation_calls_same_method_on_children_with_context",
          "type": "function_definition",
          "line_start": 4255,
          "line_end": 4288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 4290,
          "line_end": 4312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_unknown_type",
          "type": "function_definition",
          "line_start": 4314,
          "line_end": 4330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_calls_block_render_on_children",
          "type": "function_definition",
          "line_start": 4332,
          "line_end": 4353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_passes_context_to_children",
          "type": "function_definition",
          "line_start": 4355,
          "line_end": 4385,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render_on_stream_child_uses_child_template",
          "type": "function_definition",
          "line_start": 4387,
          "line_end": 4411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_can_pass_context_to_stream_child_template",
          "type": "function_definition",
          "line_start": 4413,
          "line_end": 4429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 4431,
          "line_end": 4473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4439,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4460,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 4463,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4431,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.388,
          "ai_signals": [
            "High anti-pattern density (0.93)"
          ]
        },
        {
          "name": "test_value_omitted_from_data",
          "type": "function_definition",
          "line_start": 4475,
          "line_end": 4501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred_propagates_to_child_blocks",
          "type": "function_definition",
          "line_start": 4503,
          "line_end": 4517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_validation_errors",
          "type": "function_definition",
          "line_start": 4519,
          "line_end": 4559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4519,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_validation_errors is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1477,
          "ai_signals": []
        },
        {
          "name": "test_min_num_validation_errors",
          "type": "function_definition",
          "line_start": 4561,
          "line_end": 4583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_max_num_validation_errors",
          "type": "function_definition",
          "line_start": 4585,
          "line_end": 4620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_block_counts_min_validation_errors",
          "type": "function_definition",
          "line_start": 4622,
          "line_end": 4658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_block_counts_max_validation_errors",
          "type": "function_definition",
          "line_start": 4660,
          "line_end": 4702,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4660,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_block_counts_max_validation_errors is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1438,
          "ai_signals": []
        },
        {
          "name": "test_ordering_in_form_submission_uses_order_field",
          "type": "function_definition",
          "line_start": 4704,
          "line_end": 4726,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4713,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2146,
          "ai_signals": []
        },
        {
          "name": "test_ordering_in_form_submission_is_numeric",
          "type": "function_definition",
          "line_start": 4728,
          "line_end": 4748,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4737,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.229,
          "ai_signals": []
        },
        {
          "name": "test_searchable_content",
          "type": "function_definition",
          "line_start": 4750,
          "line_end": 4782,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_meta_default",
          "type": "function_definition",
          "line_start": 4784,
          "line_end": 4807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_constructor_default",
          "type": "function_definition",
          "line_start": 4809,
          "line_end": 4832,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_callable_default",
          "type": "function_definition",
          "line_start": 4834,
          "line_end": 4855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_stream_value_equality",
          "type": "function_definition",
          "line_start": 4857,
          "line_end": 4869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_considers_group_attribute",
          "type": "function_definition",
          "line_start": 4871,
          "line_end": 4907,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4904,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.157,
          "ai_signals": []
        },
        {
          "name": "test_value_from_datadict",
          "type": "function_definition",
          "line_start": 4909,
          "line_end": 4946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 4936,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4909,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_value_from_datadict is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2466,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "check_get_prep_value",
          "type": "function_definition",
          "line_start": 4948,
          "line_end": 4973,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 4969,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 4969,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_get_prep_value_not_lazy",
          "type": "function_definition",
          "line_start": 4975,
          "line_end": 4980,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value_is_lazy",
          "type": "function_definition",
          "line_start": 4982,
          "line_end": 4987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "check_get_prep_value_nested_streamblocks",
          "type": "function_definition",
          "line_start": 4989,
          "line_end": 5014,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value_nested_streamblocks_not_lazy",
          "type": "function_definition",
          "line_start": 5016,
          "line_end": 5021,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value_nested_streamblocks_is_lazy",
          "type": "function_definition",
          "line_start": 5023,
          "line_end": 5039,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_modifications_to_stream_child_id_are_saved",
          "type": "function_definition",
          "line_start": 5041,
          "line_end": 5061,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_modifications_to_stream_child_value_are_saved",
          "type": "function_definition",
          "line_start": 5063,
          "line_end": 5083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_set_streamvalue_item",
          "type": "function_definition",
          "line_start": 5085,
          "line_end": 5105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_delete_streamvalue_item",
          "type": "function_definition",
          "line_start": 5107,
          "line_end": 5126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_insert_streamvalue_item",
          "type": "function_definition",
          "line_start": 5128,
          "line_end": 5149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 5140,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 5140,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3806,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_append_streamvalue_item",
          "type": "function_definition",
          "line_start": 5151,
          "line_end": 5172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_streamvalue_raw_data",
          "type": "function_definition",
          "line_start": 5174,
          "line_end": 5243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5174,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_streamvalue_raw_data is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1124,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_form_attrs",
          "type": "function_definition",
          "line_start": 5245,
          "line_end": 5266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5258,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2215,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_classname_via_kwarg",
          "type": "function_definition",
          "line_start": 5268,
          "line_end": 5298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5280,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5285,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 5288,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4011,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "test_block_names",
          "type": "function_definition",
          "line_start": 5300,
          "line_end": 5365,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 5345,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5300,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_block_names is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_classname_via_class_meta",
          "type": "function_definition",
          "line_start": 5367,
          "line_end": 5397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5379,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5384,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 5387,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4011,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 5401,
          "line_end": 5422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_normalize_empty_stream",
          "type": "function_definition",
          "line_start": 5424,
          "line_end": 5431,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 5426,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_normalize_base_case",
          "type": "function_definition",
          "line_start": 5433,
          "line_end": 5440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize_recursive",
          "type": "function_definition",
          "line_start": 5442,
          "line_end": 5511,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 5492,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5442,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_normalize_recursive is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python",
          "type": "function_definition",
          "line_start": 5517,
          "line_end": 5552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 5554,
          "line_end": 5573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python",
          "type": "function_definition",
          "line_start": 5579,
          "line_end": 5643,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5579,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_bulk_to_python is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1162,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 5645,
          "line_end": 5684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5645,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_extract_references is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1499,
          "ai_signals": []
        },
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 5690,
          "line_end": 5698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 5700,
          "line_end": 5708,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 5710,
          "line_end": 5739,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5718,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5727,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 5731,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_target_model_string",
          "type": "function_definition",
          "line_start": 5741,
          "line_end": 5749,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5747,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_target_model_literal",
          "type": "function_definition",
          "line_start": 5751,
          "line_end": 5759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5757,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_target_model_multiple_strings",
          "type": "function_definition",
          "line_start": 5761,
          "line_end": 5770,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5768,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_target_model_multiple_literals",
          "type": "function_definition",
          "line_start": 5772,
          "line_end": 5780,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5778,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_can_choose_root",
          "type": "function_definition",
          "line_start": 5782,
          "line_end": 5790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5788,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_response",
          "type": "function_definition",
          "line_start": 5792,
          "line_end": 5800,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 5802,
          "line_end": 5812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred",
          "type": "function_definition",
          "line_start": 5814,
          "line_end": 5826,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_target_model_default",
          "type": "function_definition",
          "line_start": 5828,
          "line_end": 5830,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_target_model_string",
          "type": "function_definition",
          "line_start": 5832,
          "line_end": 5834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_target_model_literal",
          "type": "function_definition",
          "line_start": 5836,
          "line_end": 5838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_target_model_multiple_strings",
          "type": "function_definition",
          "line_start": 5840,
          "line_end": 5844,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_target_model_multiple_literals",
          "type": "function_definition",
          "line_start": 5846,
          "line_end": 5848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_target_model_default",
          "type": "function_definition",
          "line_start": 5850,
          "line_end": 5854,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_target_model_string",
          "type": "function_definition",
          "line_start": 5856,
          "line_end": 5865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_target_model_literal",
          "type": "function_definition",
          "line_start": 5867,
          "line_end": 5876,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_target_model_multiple_strings",
          "type": "function_definition",
          "line_start": 5878,
          "line_end": 5889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_target_model_multiple_literals",
          "type": "function_definition",
          "line_start": 5891,
          "line_end": 5900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python",
          "type": "function_definition",
          "line_start": 5902,
          "line_end": 5910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_distinct_instances",
          "type": "function_definition",
          "line_start": 5912,
          "line_end": 5920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 5922,
          "line_end": 5932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt_with_constructor",
          "type": "function_definition",
          "line_start": 5936,
          "line_end": 5957,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5943,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 5951,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5953,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_subclass",
          "type": "function_definition",
          "line_start": 5959,
          "line_end": 5982,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5968,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 5976,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5978,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_subclass_displays_default_text_if_no_admin_text",
          "type": "function_definition",
          "line_start": 5984,
          "line_end": 6006,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 5987,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 5992,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6000,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6002,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_subclass_displays_default_text_if_no_admin_text_and_no_label",
          "type": "function_definition",
          "line_start": 6008,
          "line_end": 6031,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6008,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6017,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6025,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6027,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_works_with_mark_safe",
          "type": "function_definition",
          "line_start": 6033,
          "line_end": 6056,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6042,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6050,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6052,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_form_attrs",
          "type": "function_definition",
          "line_start": 6058,
          "line_end": 6078,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6069,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.229,
          "ai_signals": []
        },
        {
          "name": "test_get_default",
          "type": "function_definition",
          "line_start": 6080,
          "line_end": 6083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 6085,
          "line_end": 6088,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6087,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6088,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_without_template",
          "type": "function_definition",
          "line_start": 6090,
          "line_end": 6093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6092,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 6095,
          "line_end": 6098,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 6100,
          "line_end": 6103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_normalize",
          "type": "function_definition",
          "line_start": 6105,
          "line_end": 6109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 6113,
          "line_end": 6138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6119,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6123,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6131,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_format",
          "type": "function_definition",
          "line_start": 6140,
          "line_end": 6146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6144,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6146,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 6150,
          "line_end": 6175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6156,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6160,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6164,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6168,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_format",
          "type": "function_definition",
          "line_start": 6177,
          "line_end": 6183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6181,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6183,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 6187,
          "line_end": 6212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6193,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6197,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 6201,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6205,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_format",
          "type": "function_definition",
          "line_start": 6214,
          "line_end": 6220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6218,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 6220,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_name_cannot_contain_non_alphanumeric",
          "type": "function_definition",
          "line_start": 6224,
          "line_end": 6239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_name_must_be_nonempty",
          "type": "function_definition",
          "line_start": 6241,
          "line_end": 6253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_name_cannot_contain_spaces",
          "type": "function_definition",
          "line_start": 6255,
          "line_end": 6267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_name_cannot_contain_dashes",
          "type": "function_definition",
          "line_start": 6269,
          "line_end": 6281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_name_cannot_begin_with_digit",
          "type": "function_definition",
          "line_start": 6283,
          "line_end": 6295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_system_checks_recurse_into_lists",
          "type": "function_definition",
          "line_start": 6297,
          "line_end": 6319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_system_checks_recurse_into_streams",
          "type": "function_definition",
          "line_start": 6321,
          "line_end": 6348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_system_checks_recurse_into_structs",
          "type": "function_definition",
          "line_start": 6350,
          "line_end": 6390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 6350,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_system_checks_recurse_into_structs is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1477,
          "ai_signals": []
        },
        {
          "name": "test_render_with_custom_context",
          "type": "function_definition",
          "line_start": 6394,
          "line_end": 6402,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6398,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_with_custom_form_context",
          "type": "decorated_definition",
          "line_start": 6404,
          "line_end": 6411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6408,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6408,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 6410,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "unittest.expectedFailure  # TODO(telepath)"
          ]
        },
        {
          "name": "test_include_block_tag_with_boundblock",
          "type": "function_definition",
          "line_start": 6415,
          "line_end": 6430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6423,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2811,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_include_block_tag_with_structvalue",
          "type": "function_definition",
          "line_start": 6432,
          "line_end": 6452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6442,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.229,
          "ai_signals": []
        },
        {
          "name": "test_include_block_tag_with_streamvalue",
          "type": "function_definition",
          "line_start": 6454,
          "line_end": 6482,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6472,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1831,
          "ai_signals": []
        },
        {
          "name": "test_include_block_tag_with_plain_value",
          "type": "function_definition",
          "line_start": 6484,
          "line_end": 6496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6489,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_include_block_tag_with_filtered_value",
          "type": "function_definition",
          "line_start": 6498,
          "line_end": 6522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6506,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6515,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3424,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_include_block_tag_with_extra_context",
          "type": "function_definition",
          "line_start": 6524,
          "line_end": 6541,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6532,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2568,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_include_block_tag_with_only_flag",
          "type": "function_definition",
          "line_start": 6543,
          "line_end": 6558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6551,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2811,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_include_block_html_escaping",
          "type": "function_definition",
          "line_start": 6560,
          "line_end": 6624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6567,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6576,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6588,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6596,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6609,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 6618,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 6560,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_include_block_html_escaping is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4124,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_block_render_passes_the_value_argument_to_get_template",
          "type": "function_definition",
          "line_start": 6628,
          "line_end": 6644,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_plain_validation_error",
          "type": "function_definition",
          "line_start": 6648,
          "line_end": 6652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_validation_error_with_multiple_messages",
          "type": "function_definition",
          "line_start": 6654,
          "line_end": 6664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_structblock_validation_error",
          "type": "function_definition",
          "line_start": 6666,
          "line_end": 6689,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_structblock_validation_error_with_no_block_errors",
          "type": "function_definition",
          "line_start": 6691,
          "line_end": 6704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_structblock_validation_error_with_no_non_block_errors",
          "type": "function_definition",
          "line_start": 6706,
          "line_end": 6719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_streamblock_validation_error",
          "type": "function_definition",
          "line_start": 6721,
          "line_end": 6780,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 6721,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_streamblock_validation_error is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1207,
          "ai_signals": []
        },
        {
          "name": "test_streamblock_validation_error_with_no_block_errors",
          "type": "function_definition",
          "line_start": 6782,
          "line_end": 6795,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_streamblock_validation_error_with_no_non_block_errors",
          "type": "function_definition",
          "line_start": 6797,
          "line_end": 6812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_listblock_validation_error_constructed_with_list",
          "type": "function_definition",
          "line_start": 6814,
          "line_end": 6875,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 6814,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_listblock_validation_error_constructed_with_list is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1188,
          "ai_signals": []
        },
        {
          "name": "test_listblock_validation_error_constructed_with_dict",
          "type": "function_definition",
          "line_start": 6877,
          "line_end": 6929,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 6877,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_listblock_validation_error_constructed_with_dict is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1284,
          "ai_signals": []
        },
        {
          "name": "test_listblock_validation_error_with_no_non_block_errors",
          "type": "function_definition",
          "line_start": 6931,
          "line_end": 6942,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_listblock_validation_error_with_no_block_errors",
          "type": "function_definition",
          "line_start": 6944,
          "line_end": 6957,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_simple_lookup",
          "type": "function_definition",
          "line_start": 6961,
          "line_end": 6984,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_structblock_lookup",
          "type": "function_definition",
          "line_start": 6986,
          "line_end": 7009,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_streamblock_lookup",
          "type": "function_definition",
          "line_start": 7011,
          "line_end": 7034,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        },
        {
          "name": "test_listblock_lookup",
          "type": "function_definition",
          "line_start": 7036,
          "line_end": 7059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0624,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 392,
        "avg_function_length": 16.7,
        "function_length_stddev": 13.09,
        "import_count": 39,
        "export_count": 0,
        "comment_lines": 391,
        "code_lines": 6669,
        "comment_ratio": 0.0554,
        "comment_what_ratio": 0.0962,
        "naming_avg_length": 7.93,
        "debug_artifacts": [],
        "ai_smell_count": 266,
        "ai_smell_density": 0.039886,
        "structural_uniformity": 0.2157,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.23,
        "mechanical": 87.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_locale_model.py",
      "language": "python",
      "line_count": 169,
      "token_estimate": 1710,
      "functions": [
        {
          "name": "make_test_page",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 20,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4239,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_default_doesnt_have_to_be_english",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"fr-ca\")"
          ]
        },
        {
          "name": "test_get_active_default",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_get_active_overridden",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_for_unrecognised_language",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_local",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_local_for_unrecognised_language",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_localized_reflects_active_language",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_localized_for_unconfigured_language",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_language_name_localized_for_unrecognised_language",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_is_bidi",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_is_default",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_is_active",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_get_display_name",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": []
        },
        {
          "name": "test_str_reflects_get_display",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 146,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4239,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_str_when_languages_uses_gettext",
          "type": "decorated_definition",
          "line_start": 151,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGES=[(\"en\", _(\"English\")), (\"fr\", _(\"French\"))])"
          ]
        },
        {
          "name": "test_change_root_page_locale_on_locale_deletion",
          "type": "decorated_definition",
          "line_start": 156,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0739,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"fr\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 6.9,
        "function_length_stddev": 4.35,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 163,
        "comment_ratio": 0.0355,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.11,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.01227,
        "structural_uniformity": 0.3693,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.21,
        "mechanical": 92.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_privacy.py",
      "language": "python",
      "line_count": 249,
      "token_estimate": 2465,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_anonymous_user_must_authenticate",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 28,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 32,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 56,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 72,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 25,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_anonymous_user_must_authenticate is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3469,
          "ai_signals": [
            "High anti-pattern density (0.82)"
          ]
        },
        {
          "name": "test_anonymous_user_must_authenticate_with_custom_password_required_template",
          "type": "decorated_definition",
          "line_start": 87,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 97,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 101,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_PASSWORD_REQUIRED_TEMPLATE=\"tests/custom_page_password_required.html\"\n    )"
          ]
        },
        {
          "name": "test_view_restrictions_apply_to_subpages",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 112,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 136,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 104,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_view_restrictions_apply_to_subpages is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3457,
          "ai_signals": [
            "High anti-pattern density (0.82)"
          ]
        },
        {
          "name": "test_view_restrictions_apply_to_aliases",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 163,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2191,
          "ai_signals": []
        },
        {
          "name": "test_view_restrictions_apply_to_subpages_of_aliases",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 194,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1729,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_anonymous_user",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_unpermitted_user",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_permitted_user",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_superuser",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_login_restriction_with_anonymous_user",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_login_restriction_with_logged_in_user",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "test_password_protected_page_headers",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 243,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 17.38,
        "function_length_stddev": 18.83,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 239,
        "comment_ratio": 0.0402,
        "comment_what_ratio": 0.3,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.058577,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.91,
        "mechanical": 82.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_sites.py",
      "language": "python",
      "line_count": 219,
      "token_estimate": 2122,
      "functions": [
        {
          "name": "test_natural_key",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_get_by_natural_key",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_root_url_http",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_root_url_https",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_root_url_custom_port",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_site_name_not_default",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_site_name_default",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_no_site_name_not_default_port_80",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_no_site_name_default_port_80",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_no_site_name_not_default_port_n",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_no_site_name_default_port_n",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_site_order_by_hostname",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_site_order_by_hostname_upper",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_site_order_by_hostname_site_name_irrelevant",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_dummy_request",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_with_host",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_with_unknown_host",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_with_server_name",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 131,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 131,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4361,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_x_forwarded_host",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_ipv4_host",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_ipv6_host",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_create_default_site",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_change_default_site",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_there_can_only_be_one",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_oops_there_is_more_than_one",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_result_order_when_multiple_sites_share_the_same_root_page",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 29,
        "avg_function_length": 5.83,
        "function_length_stddev": 3.32,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 214,
        "comment_ratio": 0.0228,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.009346,
        "structural_uniformity": 0.4307,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.35,
        "mechanical": 97.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_workflow_model.py",
      "language": "python",
      "line_count": 91,
      "token_estimate": 823,
      "functions": [
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 11,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 14,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 25,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5045,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "test_missing_revision_or_draftstate_mixins",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 47,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3136,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "test_incorrect_mixins_order",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 72,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3004,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "test_correct_mixins_order",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4045,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Suspiciously uniform function lengths (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 19.5,
        "function_length_stddev": 4.43,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 88,
        "comment_ratio": 0.033,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.81,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.090909,
        "structural_uniformity": 0.7726,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.55,
        "mechanical": 64.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0002_add_verbose_name_on_userprofile.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 331,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 42,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0010_userprofile_updated_comments_notifications.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 175,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.36,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\permission_order.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 282,
      "functions": [
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 9,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 9,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 9,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 20,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 20,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 20,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5763,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        },
        {
          "name": "get_content_type_order_lookup",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 25,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 26,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5763,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 10.5,
        "function_length_stddev": 2.12,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 24,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 8.08,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.333333,
        "structural_uniformity": 0.798,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.6,
        "mechanical": 66.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\test_bulk_actions\\test_bulk_set_active_state.py",
      "language": "python",
      "line_count": 112,
      "token_estimate": 1050,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 23,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5921,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 48,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5921,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        },
        {
          "name": "test_bulk_toggle",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 58,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5921,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        },
        {
          "name": "test_user_cannot_mark_self_as_inactive",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 65,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4921,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        },
        {
          "name": "test_before_toggle_user_hook_post",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 91,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4608,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        },
        {
          "name": "test_after_toggle_user_hook",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 108,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 110,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5921,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 15.67,
        "function_length_stddev": 8.45,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 108,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.75,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.4604,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.8,
        "mechanical": 73.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\bulk_actions\\set_active_state.py",
      "language": "python",
      "line_count": 73,
      "token_estimate": 691,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get_actionable_objects",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 47,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 47,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 56,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2737,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 8.6,
        "function_length_stddev": 5.68,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 73,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.52,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.041096,
        "structural_uniformity": 0.3392,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.53,
        "mechanical": 87.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\decorators.py",
      "language": "python",
      "line_count": 83,
      "token_estimate": 608,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_human_in_loop",
              "severity": "high",
              "line": 25,
              "description": "Agent performs destructive actions without human approval -- irreversible damage risk",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_human_in_loop",
              "severity": "high",
              "line": 25,
              "description": "Destructive AI actions without human confirmation -- irreversible damage",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__get__",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__missing__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_human_in_loop",
              "severity": "high",
              "line": 45,
              "description": "Agent performs destructive actions without human approval -- irreversible damage risk",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_human_in_loop",
              "severity": "high",
              "line": 45,
              "description": "Destructive AI actions without human confirmation -- irreversible damage",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value",
          "type": "decorated_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "cache_clear",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "xframe_options_sameorigin_override",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 6,
        "function_length_stddev": 6.12,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 35,
        "code_lines": 48,
        "comment_ratio": 0.4217,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.16,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.17,
        "mechanical": 79.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\text.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 58,
      "functions": [
        {
          "name": "text_from_html",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 7,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 3,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 7,
        "comment_ratio": 0.125,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\widget_adapters.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 101,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CheckboxInputAdapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RadioSelectAdapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'SelectAdapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ValidationErrorAdapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WidgetAdapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath.widgets import (  # noqa: F401\n    CheckboxInputAdapter,\n    RadioSelectAdapter,\n    SelectAdapter,\n    ValidationErrorAdapter,\n    WidgetAdapter,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 5
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\convert_alias.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 498,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "_convert_alias",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 11,
        "function_length_stddev": 9.45,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 62,
        "comment_ratio": 0.1143,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.59,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.1408,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.7,
        "mechanical": 95.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\revert_to_page_revision.py",
      "language": "python",
      "line_count": 66,
      "token_estimate": 461,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1574,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.79)"
          ]
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1574,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.79)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1574,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.79)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 14.33,
        "function_length_stddev": 3.06,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 59,
        "comment_ratio": 0.1061,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.14,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7869,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.03,
        "mechanical": 96.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\publish.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 313,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0429,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 24,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 29,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3929,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9,
        "function_length_stddev": 7.07,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 35,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.35,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.057143,
        "structural_uniformity": 0.2143,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.21,
        "mechanical": 84.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\auth.py",
      "language": "python",
      "line_count": 153,
      "token_estimate": 1185,
      "functions": [
        {
          "name": "permission_denied",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "user_passes_test",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "permission_required",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "any_permission_required",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 71,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4044,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "require",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "require_any",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "user_has_any_page_permission",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "reject_request",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        },
        {
          "name": "require_admin_access",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1544,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 11.6,
        "function_length_stddev": 7.62,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 124,
        "comment_ratio": 0.1895,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 7.65,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.008065,
        "structural_uniformity": 0.3432,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.4,
        "mechanical": 96.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\auth.py",
      "language": "python",
      "line_count": 82,
      "token_estimate": 689,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1352,
          "ai_signals": []
        },
        {
          "name": "extra_fields",
          "type": "decorated_definition",
          "line_start": 36,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4852,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_invalid_login_error",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1352,
          "ai_signals": []
        },
        {
          "name": "extra_fields",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4852,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 76,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4852,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 6.4,
        "function_length_stddev": 2.07,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 76,
        "comment_ratio": 0.0732,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.039474,
        "structural_uniformity": 0.676,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.53,
        "mechanical": 89.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\tags.py",
      "language": "python",
      "line_count": 69,
      "token_estimate": 544,
      "functions": [
        {
          "name": "validate_tag_length",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 15,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3956,
          "ai_signals": [
            "High anti-pattern density (0.53)",
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2114,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2114,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 16.67,
        "function_length_stddev": 3.21,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 62,
        "comment_ratio": 0.1014,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 7.1,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.016129,
        "structural_uniformity": 0.8071,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.3,
        "mechanical": 82.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\messages.py",
      "language": "python",
      "line_count": 69,
      "token_estimate": 589,
      "functions": [
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "debug",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "info",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "success",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "warning",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "error",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "validation_error",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 4,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 46,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 48,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 52,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 53,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 54,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 54,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 56,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 57,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "button",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 6,
        "function_length_stddev": 8.05,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 66,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.15,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.136364,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.56,
        "mechanical": 71.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\modal_workflow.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 195,
      "functions": [
        {
          "name": "render_modal_workflow",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 21,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1458,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 24,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 24,
        "comment_ratio": 0.1724,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.46,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.041667,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.88,
        "mechanical": 74.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\group.py",
      "language": "python",
      "line_count": 194,
      "token_estimate": 1681,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 30,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 30,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 40,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 27,
              "description": "Function is 47 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 30 dynamic threshold)",
                "impact": "Function get_form_options is 47 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "on_model_bound",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 79,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 79,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "child_identifiers",
          "type": "decorated_definition",
          "line_start": 81,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 89,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 98,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "children",
          "type": "decorated_definition",
          "line_start": 104,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 111,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3092,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "visible_children",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "visible_children_with_identifiers",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "show_panel_furniture",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 147,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 150,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_comparison",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 165,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 10.54,
        "function_length_stddev": 11.99,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 17,
        "code_lines": 177,
        "comment_ratio": 0.0876,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.073446,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.13,
        "mechanical": 78.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\signal_handlers.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 151,
      "functions": [
        {
          "name": "reset_edit_handler_cache",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 16,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "receiver(setting_changed)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 17,
        "comment_ratio": 0.15,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.84,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.058824,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.29,
        "mechanical": 85.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\converters\\html_to_contentstate.py",
      "language": "python",
      "line_count": 447,
      "token_estimate": 4408,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "push",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "pop",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "add_paragraph_block",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "create_block",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "create_block",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 186,
              "description": "Function is 25 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 25 lines (> 22 dynamic threshold)",
                "impact": "Function handle_starttag is 25 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1603,
          "ai_signals": []
        },
        {
          "name": "get_attribute_data",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "get_attribute_data",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "get_attribute_data",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 267,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 277,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 255,
              "description": "Function is 70 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 22 dynamic threshold)",
                "impact": "Function handle_starttag is 70 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1703,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "create_entity",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 336,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 356,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2703,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "reset",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_starttag",
          "type": "function_definition",
          "line_start": 372,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_endtag",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        },
        {
          "name": "handle_data",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_no_xml_delimiters",
              "severity": "low",
              "line": 428,
              "description": "Long user content without XML delimiters \u2014 Claude performs better with structured input for extraction tasks",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 432,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 398,
              "description": "Function is 43 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 22 dynamic threshold)",
                "impact": "Function handle_data is 43 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2645,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "close",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0203,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 33,
        "avg_function_length": 10.52,
        "function_length_stddev": 13.55,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 77,
        "code_lines": 370,
        "comment_ratio": 0.1723,
        "comment_what_ratio": 0.1017,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.021622,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.35,
        "mechanical": 91.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\bootstrap-modal.js",
      "language": "javascript",
      "line_count": 247,
      "token_estimate": 1757,
      "functions": [
        {
          "name": "Modal",
          "type": "function_expression",
          "line_start": 26,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 221,
        "comment_ratio": 0.1053,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.iframe-transport.js",
      "language": "javascript",
      "line_count": 215,
      "token_estimate": 2652,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 65,
        "code_lines": 150,
        "comment_ratio": 0.3023,
        "comment_what_ratio": 0.1538,
        "naming_avg_length": 6.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\home\\whats_new_in_wagtail_version.stories.tsx",
      "language": "tsx",
      "line_count": 22,
      "token_estimate": 136,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 14,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 14,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.045455,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.64,
        "mechanical": 88.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\icons.stories.tsx",
      "language": "tsx",
      "line_count": 76,
      "token_estimate": 439,
      "functions": [
        {
          "name": "IconsTable",
          "type": "arrow_function",
          "line_start": 13,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 1,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function IconsTable is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "react-table-missing-caption",
              "severity": "medium",
              "line": 26,
              "description": "Data table without caption or aria-label - screen reader users cannot understand the table's purpose",
              "fix_type": "deterministic"
            },
            {
              "id": "react-multiple-useeffect-same-deps",
              "severity": "low",
              "line": 16,
              "description": "Multiple useEffect hooks with identical dependency arrays - could be combined into one effect",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2442,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "extractComponentDescription",
          "type": "arrow_function",
          "line_start": 61,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "AllIcons",
          "type": "arrow_function",
          "line_start": 71,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "react-spreading-props-to-dom",
              "severity": "medium",
              "line": 71,
              "description": "Spreading all props onto a DOM element without destructuring - passes unknown/invalid HTML attributes, causing React warnings and potential XSS",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-dangerouslysetinnerhtml-user-input",
              "severity": "critical",
              "line": 39,
              "description": "dangerouslySetInnerHTML without sanitization \u2014 XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 15,
        "function_length_stddev": 24.25,
        "import_count": 2,
        "export_count": 2,
        "comment_lines": 4,
        "code_lines": 72,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.32,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.055556,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.61,
        "mechanical": 84.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\api\\test_documents.py",
      "language": "python",
      "line_count": 152,
      "token_estimate": 1262,
      "functions": [
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "get_document_id_list",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 33,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 33,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 33,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 33,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 49,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 26,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 77,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 77,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 77,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 77,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 79,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "get_document_id_list",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1368,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.68)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 112,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 112,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 112,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 112,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 105,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.68)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 13.75,
        "function_length_stddev": 18.9,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 133,
        "comment_ratio": 0.125,
        "comment_what_ratio": 0.6842,
        "naming_avg_length": 6.99,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.120301,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.5,
        "mechanical": 72.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_convert_alias.py",
      "language": "python",
      "line_count": 90,
      "token_estimate": 764,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.122,
          "ai_signals": []
        },
        {
          "name": "test_convert_alias",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.122,
          "ai_signals": []
        },
        {
          "name": "test_convert_alias_not_alias",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.122,
          "ai_signals": []
        },
        {
          "name": "test_convert_alias_bad_permission",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3407,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_post_convert_alias",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.122,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 15,
        "function_length_stddev": 11.85,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 80,
        "comment_ratio": 0.1111,
        "comment_what_ratio": 0.4,
        "naming_avg_length": 7.15,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.0125,
        "structural_uniformity": 0.2098,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.38,
        "mechanical": 95.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_page_locking.py",
      "language": "python",
      "line_count": 346,
      "token_estimate": 2941,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_get",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post_already_locked",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post_with_good_redirect",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post_with_bad_redirect",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post_bad_page",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_lock_post_bad_permissions",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4253,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_locked_pages_dashboard_panel",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_get",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_already_unlocked",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_with_good_redirect",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_with_bad_redirect",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_bad_page",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2662,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_bad_permissions",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 297,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4253,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_unlock_post_own_page_with_bad_permissions",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 322,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3868,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 18.65,
        "function_length_stddev": 6.26,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 48,
        "code_lines": 298,
        "comment_ratio": 0.1387,
        "comment_what_ratio": 0.6667,
        "naming_avg_length": 6.68,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.010067,
        "structural_uniformity": 0.6641,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.89,
        "mechanical": 94.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_view_draft.py",
      "language": "python",
      "line_count": 146,
      "token_estimate": 1349,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2877,
          "ai_signals": []
        },
        {
          "name": "test_draft_access_admin",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1355,
          "ai_signals": []
        },
        {
          "name": "test_page_without_preview_modes_is_unauthorised",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1355,
          "ai_signals": []
        },
        {
          "name": "test_draft_access_unauthorised",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1355,
          "ai_signals": []
        },
        {
          "name": "test_draft_access_authorised",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 78,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 78,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 79,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4855,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_middleware_response_is_returned",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1355,
          "ai_signals": []
        },
        {
          "name": "test_show_edit_link_in_userbar",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1355,
          "ai_signals": []
        },
        {
          "name": "test_preview_modes",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 128,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 129,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 137,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 145,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4855,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 15.62,
        "function_length_stddev": 7.17,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 113,
        "comment_ratio": 0.226,
        "comment_what_ratio": 0.1364,
        "naming_avg_length": 6.92,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.079646,
        "structural_uniformity": 0.5411,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.34,
        "mechanical": 77.34,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_chooser.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 440,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0348,
          "ai_signals": []
        },
        {
          "name": "test_upload_tab_visible_on_validation_error",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 28,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 28,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 28,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 28,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 32,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_EXTENSIONS=[\"pdf\"])"
          ]
        },
        {
          "name": "test_upload_tab_hidden_on_initial_load",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 45,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 45,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 45,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 45,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 47,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 13.33,
        "function_length_stddev": 11.02,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 51,
        "comment_ratio": 0.0727,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.65,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.196078,
        "structural_uniformity": 0.1739,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.0,
        "mechanical": 74.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_editing_sessions.py",
      "language": "python",
      "line_count": 1749,
      "token_estimate": 17185,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 87,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 87,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 59,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2389,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_ping_invalid_model",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 108,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 108,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ping_non_page_non_snippet_model",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 117,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 117,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 121,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 121,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ping_non_existent_object",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "test_ping_existing_session",
          "type": "decorated_definition",
          "line_start": 142,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 151,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 167,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2202,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_existing_session_with_editing_flag",
          "type": "decorated_definition",
          "line_start": 178,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 188,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 206,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 178,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_existing_session_with_editing_flag is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2965,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_with_other_idle_session",
          "type": "decorated_definition",
          "line_start": 217,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 221,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 221,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 232,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 257,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 217,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_with_other_idle_session is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_with_revision",
          "type": "decorated_definition",
          "line_start": 268,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 158,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 278,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 296,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 319,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 337,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 376,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 395,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 268,
              "description": "Function is 158 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 158 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_with_revision is 158 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1753,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_with_overwritten_revision",
          "type": "decorated_definition",
          "line_start": 427,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 171,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 445,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 463,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 494,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 514,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 552,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 571,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 427,
              "description": "Function is 171 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 171 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_with_overwritten_revision is 171 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1635,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_with_multiple_revisions_since_own_revision",
          "type": "decorated_definition",
          "line_start": 599,
          "line_end": 689,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 91,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 608,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 608,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 623,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 655,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 599,
              "description": "Function is 91 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 91 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_with_multiple_revisions_since_own_revision is 91 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2125,
          "ai_signals": [
            "High anti-pattern density (0.55)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_with_new_revision_that_has_no_user",
          "type": "decorated_definition",
          "line_start": 691,
          "line_end": 765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 705,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 731,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 691,
              "description": "Function is 75 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_with_new_revision_that_has_no_user is 75 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1602,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_session_ordering",
          "type": "decorated_definition",
          "line_start": 767,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 86,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 778,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 778,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 784,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 784,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 791,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 791,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 808,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 767,
              "description": "Function is 86 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 86 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_session_ordering is 86 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3458,
          "ai_signals": [
            "High anti-pattern density (0.93)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_new_session",
          "type": "decorated_definition",
          "line_start": 854,
          "line_end": 907,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 863,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 854,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_new_session is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1498,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_new_session_with_editing_flag",
          "type": "decorated_definition",
          "line_start": 909,
          "line_end": 1011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 103,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 919,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 961,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 986,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 909,
              "description": "Function is 103 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 103 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_new_session_with_editing_flag is 103 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1561,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_new_session_with_revision",
          "type": "decorated_definition",
          "line_start": 1013,
          "line_end": 1235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 223,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1023,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1065,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1099,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1143,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1183,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1214,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1013,
              "description": "Function is 223 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 223 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_new_session_with_revision is 223 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1301,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_user_must_have_edit_permission_on_page",
          "type": "decorated_definition",
          "line_start": 1237,
          "line_end": 1267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1243,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.1331,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_moderator_without_explicit_edit_permission_on_page",
          "type": "function_definition",
          "line_start": 1269,
          "line_end": 1291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1282,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1284,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1284,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locked_page",
          "type": "function_definition",
          "line_start": 1293,
          "line_end": 1306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1299,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1299,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ping_snippet_model",
          "type": "decorated_definition",
          "line_start": 1308,
          "line_end": 1376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1309,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1309,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1316,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1324,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1324,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1332,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1332,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1339,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1339,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1348,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1348,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1359,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1308,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_ping_snippet_model is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_ping_snippet_model_without_permission",
          "type": "function_definition",
          "line_start": 1378,
          "line_end": 1399,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1385,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1389,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1389,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_moderator_without_explicit_edit_permission_on_snippet",
          "type": "function_definition",
          "line_start": 1401,
          "line_end": 1438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1406,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1406,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1422,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1426,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1426,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1431,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1431,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1401,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_moderator_without_explicit_edit_permission_on_snippet is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locked_snippet",
          "type": "function_definition",
          "line_start": 1440,
          "line_end": 1462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1450,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1450,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1455,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1455,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3702,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_must_post",
          "type": "function_definition",
          "line_start": 1464,
          "line_end": 1475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "test_invalid_data",
          "type": "function_definition",
          "line_start": 1477,
          "line_end": 1490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1486,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2702,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1494,
          "line_end": 1523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1503,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1503,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2535,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_cleanup",
          "type": "decorated_definition",
          "line_start": 1525,
          "line_end": 1530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1534,
          "line_end": 1561,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1548,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1548,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2702,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_release",
          "type": "function_definition",
          "line_start": 1563,
          "line_end": 1571,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "test_must_post",
          "type": "function_definition",
          "line_start": 1573,
          "line_end": 1581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "test_cannot_release_other_users_session",
          "type": "function_definition",
          "line_start": 1583,
          "line_end": 1593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1600,
          "line_end": 1620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1605,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1605,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3535,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "create_object",
          "type": "function_definition",
          "line_start": 1622,
          "line_end": 1627,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1629,
          "line_end": 1630,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "assertRevisionInput",
          "type": "function_definition",
          "line_start": 1632,
          "line_end": 1646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "test_edit_view_with_default_interval",
          "type": "decorated_definition",
          "line_start": 1648,
          "line_end": 1673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1667,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1548,
          "ai_signals": [],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)"
          ]
        },
        {
          "name": "test_edit_view_with_custom_interval",
          "type": "decorated_definition",
          "line_start": 1675,
          "line_end": 1720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1695,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1703,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1675,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_view_with_custom_interval is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2485,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ],
          "decorators": [
            "freeze_time(TIMESTAMP_NOW)",
            "override_settings(WAGTAIL_EDITING_SESSION_PING_INTERVAL=30000)"
          ]
        },
        {
          "name": "url_name",
          "type": "decorated_definition",
          "line_start": 1726,
          "line_end": 1728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "create_object",
          "type": "function_definition",
          "line_start": 1730,
          "line_end": 1733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "url_name",
          "type": "decorated_definition",
          "line_start": 1739,
          "line_end": 1741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "create_object",
          "type": "function_definition",
          "line_start": 1743,
          "line_end": 1744,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        },
        {
          "name": "assertRevisionInput",
          "type": "function_definition",
          "line_start": 1746,
          "line_end": 1748,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0202,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 41,
        "avg_function_length": 39.83,
        "function_length_stddev": 49.08,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 99,
        "code_lines": 1650,
        "comment_ratio": 0.0566,
        "comment_what_ratio": 0.101,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 107,
        "ai_smell_density": 0.064848,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.77,
        "mechanical": 74.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_messages.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 268,
      "functions": [
        {
          "name": "test_message_tag_classes",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 22,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 23,
        "comment_ratio": 0.1786,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 6.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.4,
        "mechanical": 96.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_site_summary.py",
      "language": "python",
      "line_count": 87,
      "token_estimate": 862,
      "functions": [
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "assertSummaryContains",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "assertSummaryContainsLinkToPage",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_user_with_page_permissions_is_shown_panel",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_single_site_summary_links_to_site_root",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_multiple_sites_summary_links_to_wagtail_root",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_no_sites_summary_links_to_wagtail_root",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_summary_includes_page_count_without_wagtail_root",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_summary_shows_zero_pages_if_none_exist_except_wagtail_root",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_user_with_no_page_permissions_is_not_shown_panel",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0073,
          "ai_signals": []
        },
        {
          "name": "test_user_with_limited_page_permissions",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 72,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 74,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3573,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 4.85,
        "function_length_stddev": 4.67,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 85,
        "comment_ratio": 0.023,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.8,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.023529,
        "structural_uniformity": 0.0364,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.46,
        "mechanical": 93.46,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_widgets.py",
      "language": "python",
      "line_count": 923,
      "token_estimate": 8398,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_not_hidden",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 38,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2949,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_adapt_with_target_model",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 54,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 54,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 57,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_can_choose_root",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 65,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_with_user_perm",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_with_value",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_with_target_model",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 114,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 114,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_with_target_model_as_single_instance",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_with_target_model_as_single_string",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_with_multiple_target_models",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_with_can_choose_root",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_get_instance",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 186,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_custom_format",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 193,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 208,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_input_schema",
              "severity": "medium",
              "line": 208,
              "description": "Model serving without input schema \u2014 invalid requests not caught",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init_with_format",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_with_format_from_settings",
          "type": "decorated_definition",
          "line_start": 222,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_DATE_FORMAT=\"%d.%m.%Y.\")"
          ]
        },
        {
          "name": "test_media_inheritance",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 239,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 240,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 247,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_custom_format",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 254,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 269,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_input_schema",
              "severity": "medium",
              "line": 269,
              "description": "Model serving without input schema \u2014 invalid requests not caught",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init_with_format",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_with_format_from_settings",
          "type": "decorated_definition",
          "line_start": 282,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_TIME_FORMAT=\"%H:%M:%S\")"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 297,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3504,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_adapt_with_custom_format",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 314,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3192,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_adapt_with_custom_parent_selector",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 331,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3192,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_render_js_init",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 354,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_input_schema",
              "severity": "medium",
              "line": 354,
              "description": "Model serving without input schema \u2014 invalid requests not caught",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init_with_format",
          "type": "function_definition",
          "line_start": 361,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_with_format_from_settings",
          "type": "decorated_definition",
          "line_start": 376,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_DATETIME_FORMAT=\"%d.%m.%Y. %H:%M\", WAGTAIL_TIME_FORMAT=\"%H:%M %p\"\n    )"
          ]
        },
        {
          "name": "get_js_init_params",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 397,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 403,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 406,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 409,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_js_init_basic",
          "type": "function_definition",
          "line_start": 419,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_js_init_no_spaces_allowed",
          "type": "decorated_definition",
          "line_start": 435,
          "line_end": 450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_TAG_SPACES_ALLOWED=False)"
          ]
        },
        {
          "name": "test_render_js_init_with_tag_limit",
          "type": "decorated_definition",
          "line_start": 452,
          "line_end": 468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_TAG_LIMIT=5)"
          ]
        },
        {
          "name": "test_render_js_init_with_tag_model",
          "type": "function_definition",
          "line_start": 470,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 470,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 470,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_with_free_tagging_false",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_with_free_tagging_true",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_tags_help_text_spaces_allowed",
          "type": "decorated_definition",
          "line_start": 522,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_TAG_SPACES_ALLOWED=True)"
          ]
        },
        {
          "name": "test_tags_help_text_no_spaces_allowed",
          "type": "decorated_definition",
          "line_start": 540,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_TAG_SPACES_ALLOWED=False)"
          ]
        },
        {
          "name": "test_legacy_tag_limit_setting",
          "type": "decorated_definition",
          "line_start": 557,
          "line_end": 574,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(TAG_LIMIT=3)"
          ]
        },
        {
          "name": "test_legacy_tag_spaces_allowed_setting",
          "type": "decorated_definition",
          "line_start": 576,
          "line_end": 593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(TAG_SPACES_ALLOWED=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 597,
          "line_end": 599,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_tag_whitelisting",
          "type": "function_definition",
          "line_start": 601,
          "line_end": 608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_override_free_tagging",
          "type": "function_definition",
          "line_start": 610,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_tag_over_one_hundred_characters",
          "type": "function_definition",
          "line_start": 618,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 623,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 630,
          "line_end": 652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_optgroups",
          "type": "function_definition",
          "line_start": 654,
          "line_end": 698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 685,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 691,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 654,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_optgroups is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3338,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "getAttrs",
          "type": "function_definition",
          "line_start": 702,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_has_data_attr",
          "type": "function_definition",
          "line_start": 712,
          "line_end": 720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_render_data_attrs_from_settings",
          "type": "decorated_definition",
          "line_start": 722,
          "line_end": 728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ALLOW_UNICODE_SLUGS=False)"
          ]
        },
        {
          "name": "test_with_locale_and_formatters_not_provided",
          "type": "function_definition",
          "line_start": 730,
          "line_end": 759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_with_formatters_provided_are_escaped",
          "type": "function_definition",
          "line_start": 763,
          "line_end": 769,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_with_formatters_as_string",
          "type": "function_definition",
          "line_start": 771,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_with_formatters_as_pattern",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 785,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 794,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_formatters_as_list_like_with_string",
          "type": "function_definition",
          "line_start": 799,
          "line_end": 808,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        },
        {
          "name": "test_with_formatters_as_list_like_with_pattern",
          "type": "function_definition",
          "line_start": 810,
          "line_end": 822,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 812,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 818,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_formatters_with_replace",
          "type": "function_definition",
          "line_start": 824,
          "line_end": 835,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 831,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3921,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_with_formatters_with_replace_and_flags",
          "type": "function_definition",
          "line_start": 837,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 841,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 849,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4504,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_multiple_formatters",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 860,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3921,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_with_locale_provided",
          "type": "function_definition",
          "line_start": 869,
          "line_end": 911,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 869,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_with_locale_provided is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1818,
          "ai_signals": []
        },
        {
          "name": "test_with_locale_blank_override",
          "type": "function_definition",
          "line_start": 913,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1004,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 63,
        "avg_function_length": 13.06,
        "function_length_stddev": 7.64,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 74,
        "code_lines": 849,
        "comment_ratio": 0.0802,
        "comment_what_ratio": 0.087,
        "naming_avg_length": 7.2,
        "debug_artifacts": [],
        "ai_smell_count": 41,
        "ai_smell_density": 0.048292,
        "structural_uniformity": 0.4151,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.92,
        "mechanical": 86.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\viewsets\\test_chooser_viewset.py",
      "language": "python",
      "line_count": 109,
      "token_estimate": 1052,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 22,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3691,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0191,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 29,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 29,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 29,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 29,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 29,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 30,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 31,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3691,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_url",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 37,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 37,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 37,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 37,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 37,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 38,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 43,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 43,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 43,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 43,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 43,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 44,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3691,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_widget_with_linked_fields",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 49,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2379,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_filter_by_locale",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 75,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 75,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 75,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 75,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 75,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 84,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 85,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 86,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 89,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 90,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3691,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0191,
          "ai_signals": []
        },
        {
          "name": "test_creation_form_class_resolved_from_string",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0191,
          "ai_signals": []
        },
        {
          "name": "test_chooser_create_view_loads",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0191,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 9.33,
        "function_length_stddev": 8.44,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 108,
        "comment_ratio": 0.0092,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.79,
        "debug_artifacts": [],
        "ai_smell_count": 31,
        "ai_smell_density": 0.287037,
        "structural_uniformity": 0.0956,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\menus\\pages.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 262,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 17,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4086,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "url",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0586,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 14,
        "function_length_stddev": 9.9,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 43,
        "comment_ratio": 0.0227,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.92,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.069767,
        "structural_uniformity": 0.2929,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.86,
        "mechanical": 74.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\editing_sessions.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 96,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.81,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\account.py",
      "language": "python",
      "line_count": 444,
      "token_estimate": 3580,
      "functions": [
        {
          "name": "get_user_login_form",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_password_reset_form",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "password_management_enabled",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "email_management_enabled",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "password_reset_enabled",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 120,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3333,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "title",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 221,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 223,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 237,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 250,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 251,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_panels",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 267,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.239,
          "ai_signals": []
        },
        {
          "name": "get_panels_by_tab",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 282,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 284,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_menu_items",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 291,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_media",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 301,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 310,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 312,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3233,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 413,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 413,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "next_page",
          "type": "decorated_definition",
          "line_start": 422,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.064,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 32,
        "avg_function_length": 7.59,
        "function_length_stddev": 6.07,
        "import_count": 27,
        "export_count": 0,
        "comment_lines": 42,
        "code_lines": 402,
        "comment_ratio": 0.0946,
        "comment_what_ratio": 0.12,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.037313,
        "structural_uniformity": 0.2001,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.67,
        "mechanical": 87.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\collections.py",
      "language": "python",
      "line_count": 191,
      "token_estimate": 1841,
      "functions": [
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_table",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "_user_may_move_collection",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_collection_contents",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 8.83,
        "function_length_stddev": 6.38,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 177,
        "comment_ratio": 0.0733,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 8.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2778,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.71,
        "mechanical": 97.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\mixins.py",
      "language": "python",
      "line_count": 1006,
      "token_estimate": 9335,
      "functions": [
        {
          "name": "run_hook",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 58,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3855,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "i18n_enabled",
          "type": "decorated_definition",
          "line_start": 114,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "locale",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "translations",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_locale",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "_set_locale_query_param",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_panel",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_bound_panel",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "_get_title_column",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "_annotate_queryset_updated_at",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "list_display",
          "type": "decorated_definition",
          "line_start": 240,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_reorder_url",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "workflow",
          "type": "decorated_definition",
          "line_start": 300,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "workflow_enabled",
          "type": "decorated_definition",
          "line_start": 308,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "workflow_state",
          "type": "decorated_definition",
          "line_start": 312,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "current_workflow_task",
          "type": "decorated_definition",
          "line_start": 321,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "workflow_tasks",
          "type": "decorated_definition",
          "line_start": 327,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 333,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 333,
              "description": "Function is 41 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 30 dynamic threshold)",
                "impact": "Function user_has_permission is 41 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1208,
          "ai_signals": []
        },
        {
          "name": "workflow_action_is_valid",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_available_actions",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 420,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_lock",
          "type": "function_definition",
          "line_start": 422,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_lock_url",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_unlock_url",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 435,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_preview_url",
          "type": "function_definition",
          "line_start": 437,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_workflow_history_url",
          "type": "function_definition",
          "line_start": 443,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_confirm_workflow_cancellation_url",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 453,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 455,
              "description": "Function is 49 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 30 dynamic threshold)",
                "impact": "Function get_success_message is 49 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1069,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 505,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 513,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 513,
              "description": "Function is 60 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 30 dynamic threshold)",
                "impact": "Function save_instance is 60 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "publish_action",
          "type": "function_definition",
          "line_start": 574,
          "line_end": 586,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "submit_action",
          "type": "function_definition",
          "line_start": 588,
          "line_end": 599,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "restart_workflow_action",
          "type": "function_definition",
          "line_start": 601,
          "line_end": 604,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "cancel_workflow_action",
          "type": "function_definition",
          "line_start": 606,
          "line_end": 608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "workflow_action_action",
          "type": "function_definition",
          "line_start": 610,
          "line_end": 621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "run_action_method",
          "type": "function_definition",
          "line_start": 623,
          "line_end": 627,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 629,
          "line_end": 650,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_success_json",
          "type": "function_definition",
          "line_start": 652,
          "line_end": 657,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 659,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_last_updated_info",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_lock_context",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 58,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 706,
              "description": "Function is 58 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 58 lines (> 30 dynamic threshold)",
                "impact": "Function get_lock_context is 58 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0958,
          "ai_signals": []
        },
        {
          "name": "get_editing_sessions",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 794,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 769,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 769,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 781,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3855,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "latest_revision",
          "type": "decorated_definition",
          "line_start": 796,
          "line_end": 798,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "latest_revision_created_at",
          "type": "decorated_definition",
          "line_start": 800,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_out_of_date",
          "type": "decorated_definition",
          "line_start": 804,
          "line_end": 832,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 834,
          "line_end": 859,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 861,
          "line_end": 885,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 892,
          "line_end": 894,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 896,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_revisions_revert_url",
          "type": "function_definition",
          "line_start": 900,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_warning_message",
          "type": "function_definition",
          "line_start": 906,
          "line_end": 919,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "_add_warning_message",
          "type": "function_definition",
          "line_start": 921,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 924,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 941,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 943,
          "line_end": 961,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 963,
          "line_end": 970,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "expects_json_response",
          "type": "decorated_definition",
          "line_start": 982,
          "line_end": 984,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "json_error_response",
          "type": "function_definition",
          "line_start": 986,
          "line_end": 994,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        },
        {
          "name": "response_is_json",
          "type": "decorated_definition",
          "line_start": 996,
          "line_end": 998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "render_partials",
          "type": "function_definition",
          "line_start": 1000,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0355,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 70,
        "avg_function_length": 11.89,
        "function_length_stddev": 12.6,
        "import_count": 33,
        "export_count": 0,
        "comment_lines": 109,
        "code_lines": 897,
        "comment_ratio": 0.1083,
        "comment_what_ratio": 0.1774,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.008919,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.21,
        "mechanical": 92.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\home.py",
      "language": "python",
      "line_count": 370,
      "token_estimate": 3437,
      "functions": [
        {
          "name": "get_upgrade_check_setting",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "upgrade_check_lts_only",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_dismissible_value",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_whats_new_banner_setting",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_dismissible_id",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 110,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function get_context_data is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0901,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 184,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 184,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 188,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 160,
              "description": "Function is 69 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 30 dynamic threshold)",
                "impact": "Function get_context_data is 69 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2116,
          "ai_signals": [
            "High anti-pattern density (0.58)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 285,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_media",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 320,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_panels",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 336,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.242,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get_site_details",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "error_test",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "default",
          "type": "decorated_definition",
          "line_start": 356,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 359,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "permission_required(\"wagtailadmin.access_admin\", login_url=\"wagtailadmin_login\")"
          ]
        },
        {
          "name": "sprite",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 369,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 12.81,
        "function_length_stddev": 16.52,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 340,
        "comment_ratio": 0.0811,
        "comment_what_ratio": 0.0435,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.029412,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.07,
        "mechanical": 88.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\page_bulk_action.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 670,
      "functions": [
        {
          "name": "get_all_objects_in_listing_query",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 17,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 17,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 36,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 36,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3922,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0422,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0422,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0422,
          "ai_signals": []
        },
        {
          "name": "get_parent_page_text",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0422,
          "ai_signals": []
        },
        {
          "name": "get_child_page_text",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0422,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 8.83,
        "function_length_stddev": 6.97,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 70,
        "comment_ratio": 0.0667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.55,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.057143,
        "structural_uniformity": 0.2111,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.05,
        "mechanical": 83.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\edit.py",
      "language": "python",
      "line_count": 1142,
      "token_estimate": 11160,
      "functions": [
        {
          "name": "get_page_title",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "add_save_confirmation_message",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_commenting_changes",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 109,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 90,
              "description": "Function is 57 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 30 dynamic threshold)",
                "impact": "Function get_commenting_changes is 57 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2068,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "send_commenting_notifications",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 125,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 184,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 184,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 216,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 222,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 223,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 226,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 148,
              "description": "Function is 125 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 125 lines (> 30 dynamic threshold)",
                "impact": "Function send_commenting_notifications is 125 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2186,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "log_commenting_changes",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 278,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 281,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 284,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 287,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 290,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 291,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 294,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 295,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 298,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 299,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 274,
              "description": "Function is 27 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 27 lines (> 15 dynamic threshold)",
                "impact": "Function log_commenting_changes is 27 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3726,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_message_button",
          "type": "function_definition",
          "line_start": 302,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_view_draft_message_button",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_view_live_message_button",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_compare_with_live_message_button",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_page_for_status",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 92,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 349,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 383,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 337,
              "description": "Function is 92 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 92 lines (> 30 dynamic threshold)",
                "impact": "Function dispatch is 92 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 430,
              "description": "Function is 42 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 30 dynamic threshold)",
                "impact": "Function get is 42 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1059,
          "ai_signals": []
        },
        {
          "name": "add_cancel_workflow_confirmation_message",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 485,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "is_cancelling_workflow",
          "type": "decorated_definition",
          "line_start": 487,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "hydrate_create_view",
          "type": "decorated_definition",
          "line_start": 495,
          "line_end": 497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "latest_revision_created_at",
          "type": "decorated_definition",
          "line_start": 499,
          "line_end": 501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_out_of_date",
          "type": "decorated_definition",
          "line_start": 503,
          "line_end": 531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 533,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 541,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1392,
          "ai_signals": []
        },
        {
          "name": "workflow_action_is_valid",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "action_name_and_method",
          "type": "decorated_definition",
          "line_start": 574,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "action_name",
          "type": "decorated_definition",
          "line_start": 600,
          "line_end": 602,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "action_method",
          "type": "decorated_definition",
          "line_start": 604,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "save_action",
          "type": "function_definition",
          "line_start": 612,
          "line_end": 679,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 642,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 612,
              "description": "Function is 68 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 30 dynamic threshold)",
                "impact": "Function save_action is 68 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1255,
          "ai_signals": []
        },
        {
          "name": "publish_action",
          "type": "function_definition",
          "line_start": 681,
          "line_end": 775,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 95,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 681,
              "description": "Function is 95 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 95 lines (> 30 dynamic threshold)",
                "impact": "Function publish_action is 95 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0594,
          "ai_signals": []
        },
        {
          "name": "submit_action",
          "type": "function_definition",
          "line_start": 777,
          "line_end": 822,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 777,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function submit_action is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0987,
          "ai_signals": []
        },
        {
          "name": "restart_workflow_action",
          "type": "function_definition",
          "line_start": 824,
          "line_end": 864,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 824,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function restart_workflow_action is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1079,
          "ai_signals": []
        },
        {
          "name": "perform_workflow_action",
          "type": "function_definition",
          "line_start": 866,
          "line_end": 903,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 866,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function perform_workflow_action is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1147,
          "ai_signals": []
        },
        {
          "name": "cancel_workflow_action",
          "type": "function_definition",
          "line_start": 905,
          "line_end": 930,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "redirect_away",
          "type": "function_definition",
          "line_start": 932,
          "line_end": 938,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "redirect_and_remain",
          "type": "function_definition",
          "line_start": 940,
          "line_end": 945,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 947,
          "line_end": 988,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 960,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 969,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 947,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function form_invalid is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2726,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_preview_url",
          "type": "function_definition",
          "line_start": 990,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_history_url",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 996,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 998,
          "line_end": 1026,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_editing_sessions",
          "type": "function_definition",
          "line_start": 1028,
          "line_end": 1050,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_action_menu",
          "type": "function_definition",
          "line_start": 1052,
          "line_end": 1059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1061,
          "line_end": 1129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1061,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function get_context_data is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 1131,
          "line_end": 1141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0226,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 43,
        "avg_function_length": 24.28,
        "function_length_stddev": 29.05,
        "import_count": 32,
        "export_count": 0,
        "comment_lines": 78,
        "code_lines": 1064,
        "comment_ratio": 0.0683,
        "comment_what_ratio": 0.1129,
        "naming_avg_length": 8.17,
        "debug_artifacts": [],
        "ai_smell_count": 36,
        "ai_smell_density": 0.033835,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.15,
        "mechanical": 80.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\search.py",
      "language": "python",
      "line_count": 152,
      "token_estimate": 1280,
      "functions": [
        {
          "name": "page_filter_search",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 21,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 21,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 41,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4289,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 74,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4289,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 93,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 94,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 99,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4176,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 127,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 109,
              "description": "Function is 32 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 32 lines (> 30 dynamic threshold)",
                "impact": "Function get_queryset is 32 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.407,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0789,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 20.2,
        "function_length_stddev": 12.24,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 143,
        "comment_ratio": 0.0592,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.3943,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.71,
        "mechanical": 69.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\base.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 512,
      "functions": [
        {
          "name": "get_filtered_queryset",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5,
        "function_length_stddev": 3.16,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 51,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3675,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.62,
        "mechanical": 98.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\viewsets\\chooser.py",
      "language": "python",
      "line_count": 235,
      "token_estimate": 2414,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 99,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 99,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "choose_view",
          "type": "decorated_definition",
          "line_start": 115,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 125,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 126,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "choose_results_view",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "chosen_view",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "chosen_multiple_view",
          "type": "decorated_definition",
          "line_start": 140,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "create_view",
          "type": "decorated_definition",
          "line_start": 144,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_creation_form_class",
          "type": "decorated_definition",
          "line_start": 155,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "widget_class",
          "type": "decorated_definition",
          "line_start": 163,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_block_class",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0667,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 10.31,
        "function_length_stddev": 8.59,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 204,
        "comment_ratio": 0.1319,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.029412,
        "structural_uniformity": 0.167,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.86,
        "mechanical": 90.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\chooser.py",
      "language": "python",
      "line_count": 354,
      "token_estimate": 3059,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "model_class",
          "type": "decorated_definition",
          "line_start": 59,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_hidden_input_context",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "render_hidden_input",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_chooser_modal_url",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_instance",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_display_title",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_value_data_from_instance",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 134,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 134,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_value_data",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 147,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 147,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 160,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2674,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "base_js_init_options",
          "type": "decorated_definition",
          "line_start": 172,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_js_init_options",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "render_js_init",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 188,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 190,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 194,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 205,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 209,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 213,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 243,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 246,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 249,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 231,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "model_names",
          "type": "decorated_definition",
          "line_start": 267,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 271,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "base_js_init_options",
          "type": "decorated_definition",
          "line_start": 276,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_instance",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_display_title",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_value_data_from_instance",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "get_js_init_options",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 309,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 313,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 314,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 322,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 326,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 327,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3987,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 333,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": []
        },
        {
          "name": "base_js_init_options",
          "type": "decorated_definition",
          "line_start": 344,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0487,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 30,
        "avg_function_length": 8.5,
        "function_length_stddev": 6.43,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 34,
        "code_lines": 320,
        "comment_ratio": 0.096,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.05625,
        "structural_uniformity": 0.2434,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.74,
        "mechanical": 83.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\conf.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 61,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 2,
          "line_end": 4,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1505,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "__hash__",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 7,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1505,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1505,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 2.33,
        "function_length_stddev": 0.58,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 11,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7526,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\apps.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 172,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 17,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 19,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 19,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 19,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 19,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 19,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 4,
              "description": "Unused import: from . import checks",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'checks' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from . import checks",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 11,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.91,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.333333,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.2,
        "mechanical": 69.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\compat.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 363,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 3,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 38,
        "comment_ratio": 0.1739,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 6.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\migrations\\0004_add_verbose_name_plural.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 102,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\tests\\test_views.py",
      "language": "python",
      "line_count": 2408,
      "token_estimate": 22920,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 50,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 56,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 56,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_render_with_submissions",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 73,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_render_without_submissions",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 93,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 99,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 99,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_render_without_submissions",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 118,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 126,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 126,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_render_with_submissions",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 146,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.331,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_render_without_submissions",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 165,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "make_form_pages",
          "type": "decorated_definition",
          "line_start": 183,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 189,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.456,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.55)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_forms_index",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 201,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_forms_index_pagination",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 209,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 212,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_forms_index_pagination_invalid",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 220,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 223,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_forms_index_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 231,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 235,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_cannot_see_forms_without_permission",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 250,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 251,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_can_see_forms_with_permission",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 258,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 259,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_cant_see_forms_after_filter_form_submissions_for_user_hook",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 272,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 273,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 281,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 282,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 284,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 284,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 287,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 289,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_filter_by_page_type",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 319,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 321,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 321,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_search_and_filter",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 330,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 330,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 334,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 338,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 338,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "make_form_pages",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 368,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_forms_index",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 385,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4825,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_forms_index_pagination",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 431,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 393,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 403,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 406,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 412,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 413,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 418,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 422,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 423,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 431,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 391,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_forms_index_pagination is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_switcher_doesnt_show_with_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 433,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 436,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_export_urls_include_filters",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 484,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 480,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "make_list_submissions",
          "type": "function_definition",
          "line_start": 486,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 490,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 503,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 504,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_with_non_form_page",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_after_filter_form_submissions_for_user_hook",
          "type": "function_definition",
          "line_start": 515,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 526,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 527,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4686,
          "ai_signals": [
            "High anti-pattern density (0.87)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_date_from",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 547,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 548,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_date_to",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 558,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 559,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_range",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 568,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 569,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 570,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_results",
          "type": "function_definition",
          "line_start": 575,
          "line_end": 594,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 586,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 587,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 588,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 589,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 593,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 593,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination",
          "type": "function_definition",
          "line_start": 596,
          "line_end": 619,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 604,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 607,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 611,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination_invalid",
          "type": "function_definition",
          "line_start": 621,
          "line_end": 634,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 631,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 634,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 636,
          "line_end": 651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 646,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 650,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_default_order",
          "type": "function_definition",
          "line_start": 653,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 658,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_url_params_ordering_recent_first",
          "type": "function_definition",
          "line_start": 661,
          "line_end": 668,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 667,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_url_params_ordering_oldest_first",
          "type": "function_definition",
          "line_start": 670,
          "line_end": 677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 676,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 681,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export",
          "type": "function_definition",
          "line_start": 716,
          "line_end": 746,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_xlsx_export",
          "type": "function_definition",
          "line_start": 748,
          "line_end": 780,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_large_export",
          "type": "function_definition",
          "line_start": 782,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 783,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3101,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_after_filter_form_submissions_for_user_hook",
          "type": "function_definition",
          "line_start": 807,
          "line_end": 854,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 807,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_submissions_csv_export_after_filter_form_submissions_for_user_hook is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2372,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_date_from_filtering",
          "type": "function_definition",
          "line_start": 856,
          "line_end": 878,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_date_to_filtering",
          "type": "function_definition",
          "line_start": 880,
          "line_end": 902,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_range_filtering",
          "type": "function_definition",
          "line_start": 904,
          "line_end": 926,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_unicode_in_submission",
          "type": "function_definition",
          "line_start": 928,
          "line_end": 947,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_unicode_in_field",
          "type": "function_definition",
          "line_start": 949,
          "line_end": 982,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 953,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2672,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "create_test_user_without_admin",
          "type": "function_definition",
          "line_start": 986,
          "line_end": 987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 989,
          "line_end": 1023,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export",
          "type": "function_definition",
          "line_start": 1025,
          "line_end": 1056,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_date_from_filtering",
          "type": "function_definition",
          "line_start": 1058,
          "line_end": 1081,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_date_to_filtering",
          "type": "function_definition",
          "line_start": 1083,
          "line_end": 1106,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_range_filtering",
          "type": "function_definition",
          "line_start": 1108,
          "line_end": 1131,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_unicode_in_submission",
          "type": "function_definition",
          "line_start": 1133,
          "line_end": 1153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export_with_unicode_in_field",
          "type": "function_definition",
          "line_start": 1155,
          "line_end": 1189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "create_test_user_without_admin",
          "type": "function_definition",
          "line_start": 1193,
          "line_end": 1194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1196,
          "line_end": 1224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "make_list_submissions",
          "type": "function_definition",
          "line_start": 1226,
          "line_end": 1239,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1230,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4143,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions",
          "type": "function_definition",
          "line_start": 1241,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1248,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1249,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1253,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1255,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1256,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_date_from",
          "type": "function_definition",
          "line_start": 1258,
          "line_end": 1273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1266,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1267,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1271,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1273,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_date_to",
          "type": "function_definition",
          "line_start": 1275,
          "line_end": 1290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1283,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1284,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1288,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1290,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_filtering_range",
          "type": "function_definition",
          "line_start": 1292,
          "line_end": 1307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1300,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1301,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1305,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1307,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination",
          "type": "function_definition",
          "line_start": 1309,
          "line_end": 1338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1317,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1320,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1324,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1330,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination_invalid",
          "type": "function_definition",
          "line_start": 1340,
          "line_end": 1353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1350,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1353,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 1355,
          "line_end": 1370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1365,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1369,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1376,
          "line_end": 1378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_show_confirmation",
          "type": "function_definition",
          "line_start": 1380,
          "line_end": 1403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1392,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1398,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.456,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_with_permissions",
          "type": "function_definition",
          "line_start": 1405,
          "line_end": 1417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_multiple_submissions_with_permissions",
          "type": "function_definition",
          "line_start": 1419,
          "line_end": 1433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_bad_permissions",
          "type": "function_definition",
          "line_start": 1435,
          "line_end": 1447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_after_filter_form_submissions_for_user_hook",
          "type": "function_definition",
          "line_start": 1449,
          "line_end": 1477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_with_next_url",
          "type": "function_definition",
          "line_start": 1479,
          "line_end": 1510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1495,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2737,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1516,
          "line_end": 1518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_show_confirmation",
          "type": "function_definition",
          "line_start": 1520,
          "line_end": 1532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1529,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4335,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_with_permissions",
          "type": "function_definition",
          "line_start": 1534,
          "line_end": 1548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_multiple_submissions_with_permissions",
          "type": "function_definition",
          "line_start": 1550,
          "line_end": 1565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_delete_submission_bad_permissions",
          "type": "function_definition",
          "line_start": 1567,
          "line_end": 1581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "create_test_user_without_admin",
          "type": "function_definition",
          "line_start": 1585,
          "line_end": 1586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1588,
          "line_end": 1673,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 86,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1604,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1611,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1618,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1631,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1588,
              "description": "Function is 86 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 86 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 86 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3678,
          "ai_signals": [
            "High anti-pattern density (0.58)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "make_list_submissions",
          "type": "function_definition",
          "line_start": 1675,
          "line_end": 1687,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1677,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4335,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions",
          "type": "function_definition",
          "line_start": 1689,
          "line_end": 1701,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1695,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_pagination",
          "type": "function_definition",
          "line_start": 1703,
          "line_end": 1728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1711,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1716,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1720,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_csv_export",
          "type": "function_definition",
          "line_start": 1730,
          "line_end": 1765,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions_ordering",
          "type": "function_definition",
          "line_start": 1767,
          "line_end": 1786,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1785,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3393,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1790,
          "line_end": 1827,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1804,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1811,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1816,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 1821,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1790,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_list_submissions",
          "type": "function_definition",
          "line_start": 1829,
          "line_end": 1841,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1836,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1837,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1852,
          "line_end": 1855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_adding_duplicate_form_labels",
          "type": "function_definition",
          "line_start": 1857,
          "line_end": 1892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1857,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1867,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1870,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1873,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1886,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_adding_duplicate_form_labels_as_cleaned_name",
          "type": "function_definition",
          "line_start": 1894,
          "line_end": 1935,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1894,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1896,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1909,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1912,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1915,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1929,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1894,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_adding_duplicate_form_labels_as_cleaned_name is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_adding_duplicate_form_labels_using_override_clean_name",
          "type": "function_definition",
          "line_start": 1937,
          "line_end": 1979,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1937,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1939,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1952,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1955,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1958,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1973,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1937,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_adding_duplicate_form_labels_using_override_clean_name is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_rename_existing_field_and_add_new_field_with_clashing_clean_name",
          "type": "function_definition",
          "line_start": 1981,
          "line_end": 2025,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1988,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1992,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2001,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2004,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2019,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1981,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename_existing_field_and_add_new_field_with_clashing_clean_name is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_adding_duplicate_form_labels_with_custom_related_name",
          "type": "function_definition",
          "line_start": 2027,
          "line_end": 2076,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2027,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2041,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2043,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2046,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2048,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2050,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2070,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2027,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_adding_duplicate_form_labels_with_custom_related_name is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_validation_errors_are_added_to_all_duplicate_fields",
          "type": "function_definition",
          "line_start": 2078,
          "line_end": 2164,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 87,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2080,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2085,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2096,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2098,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2120,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2126,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2130,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2138,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2145,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2149,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2156,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2160,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2162,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2078,
              "description": "Function is 87 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 87 lines (> 37 dynamic threshold)",
                "impact": "Function test_validation_errors_are_added_to_all_duplicate_fields is 87 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_deletion_of_duplicate_formset_form_field_allows_page_publish",
          "type": "function_definition",
          "line_start": 2166,
          "line_end": 2206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2173,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2188,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2192,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2166,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_deletion_of_duplicate_formset_form_field_allows_page_publish is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5058,
          "ai_signals": [
            "High anti-pattern density (0.98)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2223,
          "line_end": 2226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_form_is_rendered",
          "type": "function_definition",
          "line_start": 2228,
          "line_end": 2248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2237,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2244,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4976,
          "ai_signals": [
            "High anti-pattern density (0.95)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_preview_modes",
          "type": "function_definition",
          "line_start": 2250,
          "line_end": 2273,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2259,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2269,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2273,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5143,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_empty_field_type_does_not_crash_preview",
          "type": "function_definition",
          "line_start": 2275,
          "line_end": 2296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2287,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3234,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2300,
          "line_end": 2305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_get_creation_form",
          "type": "function_definition",
          "line_start": 2307,
          "line_end": 2314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_post_creation_form",
          "type": "function_definition",
          "line_start": 2316,
          "line_end": 2341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2325,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2989,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_form_page_creation_error_with_custom_clean_method",
          "type": "function_definition",
          "line_start": 2343,
          "line_end": 2370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2374,
          "line_end": 2378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_get_edit_form",
          "type": "function_definition",
          "line_start": 2380,
          "line_end": 2384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1643,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        },
        {
          "name": "test_post_edit_form",
          "type": "function_definition",
          "line_start": 2386,
          "line_end": 2407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2395,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3234,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.55)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 110,
        "avg_function_length": 19.95,
        "function_length_stddev": 14.59,
        "import_count": 22,
        "export_count": 0,
        "comment_lines": 209,
        "code_lines": 2199,
        "comment_ratio": 0.0868,
        "comment_what_ratio": 0.5528,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 202,
        "ai_smell_density": 0.09186,
        "structural_uniformity": 0.2687,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.62,
        "mechanical": 72.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\__init__.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 38,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.3,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\signal_handlers.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 205,
      "functions": [
        {
          "name": "page_published_signal_handler",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2135,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "page_unpublished_signal_handler",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2135,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 17,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 21,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5635,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 4.33,
        "function_length_stddev": 4.04,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 22,
        "comment_ratio": 0.0833,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 9.35,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.136364,
        "structural_uniformity": 0.0674,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.17,
        "mechanical": 73.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\api.py",
      "language": "python",
      "line_count": 40,
      "token_estimate": 307,
      "functions": [
        {
          "name": "find_object",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 13,
        "function_length_stddev": 0.0,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 40,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.41,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.1,
        "mechanical": 88.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\middleware.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 631,
      "functions": [
        {
          "name": "_get_redirect",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1207,
          "ai_signals": []
        },
        {
          "name": "get_redirect",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1207,
          "ai_signals": []
        },
        {
          "name": "process_response",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 38,
              "description": "Function is 32 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 32 lines (> 30 dynamic threshold)",
                "impact": "Function process_response is 32 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.23,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 17.67,
        "function_length_stddev": 12.9,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 61,
        "comment_ratio": 0.1286,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.016393,
        "structural_uniformity": 0.27,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.93,
        "mechanical": 82.93,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0008_add_verbose_name_plural.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 100,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.05,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_import_command.py",
      "language": "python",
      "line_count": 441,
      "token_estimate": 3955,
      "functions": [
        {
          "name": "test_empty_command_raises_errors",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_missing_file_raises_error",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_invalid_extension_raises_error",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_empty_file_raises_error",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_header_are_not_imported",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 57,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2939,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_format_gets_picked_up_from_file_extension",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_binary_formats_are_supported",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_redirect_gets_imported",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 90,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2471,
          "ai_signals": []
        },
        {
          "name": "test_trailing_slash_gets_stripped",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 113,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.263,
          "ai_signals": []
        },
        {
          "name": "test_site_id_does_not_exist",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_redirect_gets_added_to_site",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 148,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2047,
          "ai_signals": []
        },
        {
          "name": "test_temporary_redirect",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 174,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.228,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_from_links_get_skipped",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 200,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2402,
          "ai_signals": []
        },
        {
          "name": "test_non_absolute_to_links_get_skipped",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 224,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2402,
          "ai_signals": []
        },
        {
          "name": "test_from_links_are_converted_to_relative",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 244,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2547,
          "ai_signals": []
        },
        {
          "name": "test_column_index_are_used",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.088,
          "ai_signals": []
        },
        {
          "name": "test_nothing_gets_saved_on_dry_run",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 296,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2471,
          "ai_signals": []
        },
        {
          "name": "test_successful_ask_imports_redirect",
          "type": "function_definition",
          "line_start": 306,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 318,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 330,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3002,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_native_ask_imports_redirect",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 351,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 363,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2772,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_offset_parameter",
          "type": "function_definition",
          "line_start": 378,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 394,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.1974,
          "ai_signals": []
        },
        {
          "name": "test_limit_parameter",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 427,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 428,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3214,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 19.24,
        "function_length_stddev": 10.77,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 437,
        "comment_ratio": 0.0091,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.41,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.036613,
        "structural_uniformity": 0.4402,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.91,
        "mechanical": 80.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\urls.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 153,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 15,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\routable_page\\templatetags\\wagtailroutablepage_tags.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 239,
      "functions": [
        {
          "name": "routablepageurl",
          "type": "decorated_definition",
          "line_start": 8,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 21,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 17,
        "comment_ratio": 0.4138,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.7,
        "mechanical": 96.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\management\\commands\\searchpromotions_garbage_collect.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 121,
      "functions": [
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 15,
        "comment_ratio": 0.1176,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0008_query_verbose_name.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 105,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\tests.py",
      "language": "python",
      "line_count": 1792,
      "token_estimate": 17403,
      "functions": [
        {
          "name": "_add_N_hits",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_search_pick_create",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_search_pick_link_create",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_search_pick_ordering",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_get_most_popular",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_get_most_popular_since",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_get_search_promotions_template_tag",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_get_search_promotions_with_none_query_string",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 197,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 199,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 200,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 203,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 203,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 208,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_results",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 228,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2969,
          "ai_signals": []
        },
        {
          "name": "make_search_picks",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 236,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 251,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 254,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_invalid",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 265,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 268,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 279,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 283,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 284,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 299,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2248,
          "ai_signals": []
        },
        {
          "name": "test_results_are_ordered_alphabetically",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 342,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 345,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 346,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_searchpromotions",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 350,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 366,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 369,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_results_ordering",
          "type": "function_definition",
          "line_start": 378,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 416,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 421,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 426,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 431,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 432,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 437,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 438,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 378,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_results_ordering is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 446,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3719,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_get_with_edit_permission_only",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 461,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 465,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 472,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 474,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 481,
          "line_end": 482,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 484,
          "line_end": 497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 487,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 492,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 494,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 496,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 499,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_with_multiple_picks",
          "type": "function_definition",
          "line_start": 527,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 561,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 527,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_with_multiple_picks is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3013,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_post_with_existing_query_string",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 567,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_with_existing_query_string is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2072,
          "ai_signals": []
        },
        {
          "name": "test_post_with_invalid_query_string",
          "type": "function_definition",
          "line_start": 609,
          "line_end": 644,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 627,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 630,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 632,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 636,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 643,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 644,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_with_invalid_page",
          "type": "function_definition",
          "line_start": 646,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 663,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 669,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 670,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_with_external_link",
          "type": "function_definition",
          "line_start": 672,
          "line_end": 695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_post_without_recommendations",
          "type": "function_definition",
          "line_start": 697,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 710,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3163,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_post_with_page_and_external_link",
          "type": "function_definition",
          "line_start": 716,
          "line_end": 740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 734,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 740,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4019,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_post_missing_recommendation",
          "type": "function_definition",
          "line_start": 742,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 757,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 763,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.44,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_post_invalid_external_link",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 789,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 782,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 788,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 789,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_missing_external_text",
          "type": "function_definition",
          "line_start": 791,
          "line_end": 814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 806,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 813,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 814,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 816,
          "line_end": 829,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 822,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3719,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_get_with_add_permission_only",
          "type": "function_definition",
          "line_start": 831,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 837,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 841,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 848,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 852,
          "line_end": 862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 864,
          "line_end": 884,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 869,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 879,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 881,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 883,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 886,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 927,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 886,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_post is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.274,
          "ai_signals": []
        },
        {
          "name": "test_post_with_invalid_query_string",
          "type": "function_definition",
          "line_start": 933,
          "line_end": 973,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 956,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 959,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 961,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 965,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 971,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 972,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 973,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 933,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_with_invalid_query_string is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_with_invalid_page",
          "type": "function_definition",
          "line_start": 975,
          "line_end": 1008,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1000,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1006,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1007,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1008,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_change_query_string",
          "type": "function_definition",
          "line_start": 1010,
          "line_end": 1044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_post_reorder",
          "type": "function_definition",
          "line_start": 1046,
          "line_end": 1085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1046,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_reorder is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2094,
          "ai_signals": []
        },
        {
          "name": "test_post_with_external_link",
          "type": "function_definition",
          "line_start": 1087,
          "line_end": 1124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1087,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_with_external_link is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.214,
          "ai_signals": []
        },
        {
          "name": "test_post_delete_recommendation",
          "type": "function_definition",
          "line_start": 1126,
          "line_end": 1157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_post_without_recommendations",
          "type": "function_definition",
          "line_start": 1159,
          "line_end": 1188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1184,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2385,
          "ai_signals": []
        },
        {
          "name": "test_post_with_page_and_external_link",
          "type": "function_definition",
          "line_start": 1190,
          "line_end": 1223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1216,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1222,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1223,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4307,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_post_missing_recommendation",
          "type": "function_definition",
          "line_start": 1225,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1249,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1255,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1256,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_post_invalid_external_link",
          "type": "function_definition",
          "line_start": 1258,
          "line_end": 1290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1283,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1290,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.44,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_post_missing_external_text",
          "type": "function_definition",
          "line_start": 1292,
          "line_end": 1324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1316,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1323,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1324,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.44,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 1326,
          "line_end": 1341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1332,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3406,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_get_with_edit_permission_only",
          "type": "function_definition",
          "line_start": 1343,
          "line_end": 1362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1349,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1353,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1362,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1366,
          "line_end": 1376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1378,
          "line_end": 1383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1383,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 1385,
          "line_end": 1402,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 1404,
          "line_end": 1419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1410,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3406,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_get_with_edit_permission_only",
          "type": "function_definition",
          "line_start": 1421,
          "line_end": 1440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1427,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1431,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1440,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_garbage_collect_command",
          "type": "function_definition",
          "line_start": 1444,
          "line_end": 1497,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1452,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1459,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1466,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1444,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_garbage_collect_command is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3811,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1501,
          "line_end": 1502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1504,
          "line_end": 1505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1507,
          "line_end": 1514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1511,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1513,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1513,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1513,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1513,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 1516,
          "line_end": 1518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1516,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1516,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 1520,
          "line_end": 1526,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_no_hits",
          "type": "function_definition",
          "line_start": 1530,
          "line_end": 1531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_hit",
          "type": "function_definition",
          "line_start": 1533,
          "line_end": 1538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_10_hits",
          "type": "function_definition",
          "line_start": 1540,
          "line_end": 1546,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1542,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1550,
          "line_end": 1551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_normalisation",
          "type": "function_definition",
          "line_start": 1553,
          "line_end": 1554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_equivalent_queries",
          "type": "function_definition",
          "line_start": 1556,
          "line_end": 1565,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1564,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_different_queries",
          "type": "function_definition",
          "line_start": 1567,
          "line_end": 1576,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1575,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_query_popularity",
          "type": "function_definition",
          "line_start": 1580,
          "line_end": 1607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1613,
          "line_end": 1620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1622,
          "line_end": 1651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1625,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1628,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1631,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1632,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1635,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_no_permissions",
          "type": "function_definition",
          "line_start": 1653,
          "line_end": 1664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1658,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4135,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 1666,
          "line_end": 1679,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 1681,
          "line_end": 1695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 1697,
          "line_end": 1729,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1720,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1724,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_hits_column_localized",
          "type": "function_definition",
          "line_start": 1731,
          "line_end": 1745,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1736,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1742,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1751,
          "line_end": 1755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        },
        {
          "name": "test_search_by_query_string",
          "type": "function_definition",
          "line_start": 1757,
          "line_end": 1768,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1762,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1768,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_date",
          "type": "function_definition",
          "line_start": 1770,
          "line_end": 1788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1779,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3061,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_query_verbose_name_plural",
          "type": "function_definition",
          "line_start": 1790,
          "line_end": 1791,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1219,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 83,
        "avg_function_length": 19.9,
        "function_length_stddev": 13.09,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 134,
        "code_lines": 1658,
        "comment_ratio": 0.0748,
        "comment_what_ratio": 0.2672,
        "naming_avg_length": 7.9,
        "debug_artifacts": [],
        "ai_smell_count": 136,
        "ai_smell_density": 0.082027,
        "structural_uniformity": 0.3421,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.57,
        "mechanical": 75.57,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\forms.py",
      "language": "python",
      "line_count": 130,
      "token_estimate": 1137,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0752,
          "ai_signals": []
        },
        {
          "name": "get_change_url",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4252,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 65,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 66,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 67,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 70,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 70,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4252,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_existing_permissions",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0752,
          "ai_signals": []
        },
        {
          "name": "as_admin_panel",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3668,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 121,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2502,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 13.83,
        "function_length_stddev": 8.64,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 120,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.66,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.3758,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.93,
        "mechanical": 79.93,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\generic\\base.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 195,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.068,
          "ai_signals": []
        },
        {
          "name": "get_request",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.068,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7.5,
        "function_length_stddev": 4.95,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.34,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.25,
        "mechanical": 97.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\site_specific\\test_admin.py",
      "language": "python",
      "line_count": 932,
      "token_estimate": 9650,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 24,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "login_only_admin",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "grant_default_site_permission",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 55,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_menu_item_in_admin",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_menu_item_no_permissions",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_menu_item_with_site_specific_permission",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_menu_item_icon",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "edit_url",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_without_permission",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_with_site_specific_permission",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_without_site_specific_permission",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 143,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2592,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_without_permission",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_site_specific_permission",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_without_site_specific_permission",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_file_upload_multipart",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_create_restricted_field_without_any_permission",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 232,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2503,
          "ai_signals": []
        },
        {
          "name": "test_create_restricted_field_without_field_permission",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 262,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 265,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 274,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 275,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_restricted_field",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 297,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 300,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 309,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 310,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_edit_setting_hook_get",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4212,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_before_edit_setting_hook_post",
          "type": "function_definition",
          "line_start": 339,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 355,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2962,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_setting_hook",
          "type": "function_definition",
          "line_start": 361,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 378,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2642,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_without_permission",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_with_site_specific_permission",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_without_site_specific_permission",
          "type": "function_definition",
          "line_start": 415,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_non_existent_model",
          "type": "function_definition",
          "line_start": 425,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 425,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 425,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_with_icon",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 434,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 437,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 439,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2696,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_without_permission",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 482,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_site_specific_permission",
          "type": "function_definition",
          "line_start": 484,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit_without_site_specific_permission",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_redirect_to_relevant_instance",
          "type": "function_definition",
          "line_start": 513,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_redirect_to_relevant_instance_invalid",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_get_redirect_to_relevant_instance_with_specific_site_permission",
          "type": "function_definition",
          "line_start": 527,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 539,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 544,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4096,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_edit_restricted_field",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 564,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 567,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 576,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 577,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 553,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_restricted_field is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_restricted_field_without_field_permission",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 630,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 604,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 607,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 615,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 616,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 593,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_restricted_field_without_field_permission is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_restricted_field_without_any_permission",
          "type": "function_definition",
          "line_start": 632,
          "line_end": 664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 643,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2356,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_redirect_to_default",
          "type": "function_definition",
          "line_start": 677,
          "line_end": 689,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_redirect_to_current",
          "type": "function_definition",
          "line_start": 691,
          "line_end": 706,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_with_no_current_site",
          "type": "function_definition",
          "line_start": 708,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_switcher",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 725,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_switcher_when_only_permission_for_one_site",
          "type": "function_definition",
          "line_start": 731,
          "line_end": 741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 734,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 741,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_switcher_when_only_one_site_exists",
          "type": "function_definition",
          "line_start": 743,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 745,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 754,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_switcher_when_permission_for_individual_sites",
          "type": "function_definition",
          "line_start": 756,
          "line_end": 779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 767,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 775,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4212,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_unknown_site",
          "type": "function_definition",
          "line_start": 781,
          "line_end": 784,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 786,
          "line_end": 811,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_registered_permission",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 825,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 817,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 821,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4796,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 829,
          "line_end": 830,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_default_model_introspection",
          "type": "function_definition",
          "line_start": 832,
          "line_end": 841,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_with_custom_panels",
          "type": "function_definition",
          "line_start": 843,
          "line_end": 849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "test_with_custom_edit_handler",
          "type": "function_definition",
          "line_start": 851,
          "line_end": 854,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 858,
          "line_end": 875,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 867,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.324,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_get_permissions",
          "type": "function_definition",
          "line_start": 877,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 883,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3629,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_set_permissions",
          "type": "function_definition",
          "line_start": 893,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 893,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_set_permissions is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2193,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 63,
        "avg_function_length": 13.13,
        "function_length_stddev": 10.25,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 64,
        "code_lines": 868,
        "comment_ratio": 0.0687,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 46,
        "ai_smell_density": 0.052995,
        "structural_uniformity": 0.2193,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.49,
        "mechanical": 85.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\apps.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 80,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\tests\\test_views.py",
      "language": "python",
      "line_count": 561,
      "token_estimate": 5174,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_template_name",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_title",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_subtitle",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_form",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_success_url",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_context_data",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_dispatch_as_anon",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_dispatch_as_moderator",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 96,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_dispatch_as_user_with_perm",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 106,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_title",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_subtitle",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_submit_page_translation_view_test_get",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 154,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_page_translation_view_test_post_invalid",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 163,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_page_translation_view_test_post_single_locale",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 183,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 183,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_page_translation_view_escapes_title_in_confirmation_message",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_submit_page_translation_view_test_post_multiple_locales",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 227,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 227,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3236,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_submit_page_translation_view_multiple_locales_escapes_title_in_confirmation_message",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_title",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_get_object",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 281,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 288,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 288,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 290,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_success_url",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 300,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3653,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_get_success_url_for_single_locale",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 313,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2924,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_get_success_message",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 349,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 364,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2795,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "get_submit_url",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 370,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_snippet_url",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_submit_snippet_translation_view_test_get",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 381,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_snippet_translation_view_test_post_invalid",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 387,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_snippet_translation_view_test_post_single_locale",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 411,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 411,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3536,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_submit_snippet_translation_view_escapes_title_in_confirmation_message",
          "type": "function_definition",
          "line_start": 417,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_submit_snippet_translation_view_test_post_multiple_locales",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 442,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 442,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4236,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_submit_snippet_translation_view_multiple_locales_escapes_title_in_confirmation_message",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_hook_function_registered",
          "type": "function_definition",
          "line_start": 488,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_alias_created_after_page_saved",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_page_sync_disabled",
          "type": "decorated_definition",
          "line_start": 505,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=False)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 530,
          "line_end": 540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 538,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3918,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0736,
          "ai_signals": []
        },
        {
          "name": "test_translate_button_displayed",
          "type": "function_definition",
          "line_start": 545,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 551,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2924,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 41,
        "avg_function_length": 9.9,
        "function_length_stddev": 6.26,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 560,
        "comment_ratio": 0.0018,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.042857,
        "structural_uniformity": 0.3682,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.99,
        "mechanical": 88.99,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\sitemaps\\tests.py",
      "language": "python",
      "line_count": 287,
      "token_estimate": 2527,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 16,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.069,
          "ai_signals": []
        },
        {
          "name": "get_request_and_django_site",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "assertDatesEqual",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_items",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_get_urls_without_request",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_get_urls_with_request_site_cache",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_get_urls_without_request_with_i18n",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_get_urls_with_request_site_cache_with_i18n",
          "type": "decorated_definition",
          "line_start": 151,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_get_urls_uses_specific",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_lastmod_uses_last_published_date",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_latest_lastmod",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_latest_lastmod_missing",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_non_default_site",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_index_view",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_sitemap_view",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        },
        {
          "name": "test_sitemap_view_with_current_site_middleware",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0152,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 15.75,
        "function_length_stddev": 14.55,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 279,
        "comment_ratio": 0.0279,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.003584,
        "structural_uniformity": 0.076,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.47,
        "mechanical": 96.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\typed_table_block\\blocks.py",
      "language": "python",
      "line_count": 440,
      "token_estimate": 3791,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "as_json_data",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 28,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.347,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "rows",
          "type": "decorated_definition",
          "line_start": 52,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "render_as_block",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 86,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.396,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 90,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 98,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 99,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 101,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 105,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 106,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 107,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 110,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 113,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 116,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 120,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 123,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 129,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 98,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function value_from_datadict is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 240,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 243,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 247,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 289,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0778,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_output_format_spec",
              "severity": "medium",
              "line": 302,
              "description": "Prompt asks for structured data without specifying output format -- inconsistent response structure",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 317,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 318,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 362,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 338,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 327,
              "description": "Function is 36 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 36 lines (> 30 dynamic threshold)",
                "impact": "Function extract_references is 36 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2722,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 364,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 366,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 370,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4278,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 388,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 392,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 386,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function js_args is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3541,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 425,
          "line_end": 436,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 429,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3694,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 15,
        "function_length_stddev": 11.31,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 414,
        "comment_ratio": 0.0591,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.14,
        "debug_artifacts": [],
        "ai_smell_count": 32,
        "ai_smell_density": 0.077295,
        "structural_uniformity": 0.246,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.08,
        "mechanical": 74.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\fields.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 532,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1547,
          "ai_signals": []
        },
        {
          "name": "check_document_file_size",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1547,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1547,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 15.67,
        "function_length_stddev": 8.02,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 51,
        "comment_ratio": 0.1207,
        "comment_what_ratio": 0.2857,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.488,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.97,
        "mechanical": 91.97,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0006_copy_document_permissions_to_collections.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 453,
      "functions": [
        {
          "name": "get_document_permissions",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.7164,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "copy_document_permissions_to_collections",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 20,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 20,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 26,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 27,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.7164,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "remove_document_permissions_from_collections",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 34,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 34,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.7164,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 10.67,
        "function_length_stddev": 3.21,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 54,
        "comment_ratio": 0.0182,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 11.6,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.277778,
        "structural_uniformity": 0.6986,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.13,
        "mechanical": 71.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0014_alter_document_file_size.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 106,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\static_src\\wagtaildocs\\js\\add-multiple.js",
      "language": "javascript",
      "line_count": 192,
      "token_estimate": 1380,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 179,
        "comment_ratio": 0.0677,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.35,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_collection_privacy.py",
      "language": "python",
      "line_count": 204,
      "token_estimate": 1944,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "get_document",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 38,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 38,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_anonymous_user_must_authenticate",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 50,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 50,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 54,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 80,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 43,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_anonymous_user_must_authenticate is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3652,
          "ai_signals": [
            "High anti-pattern density (0.76)"
          ]
        },
        {
          "name": "test_anonymous_user_must_authenticate_with_custom_password_required_template",
          "type": "decorated_definition",
          "line_start": 110,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 122,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 122,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 126,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 129,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_PASSWORD_REQUIRED_TEMPLATE=\"tests/custom_docs_password_required.html\"\n    )"
          ]
        },
        {
          "name": "test_group_restriction_with_anonymous_user",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_unpermitted_user",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_permitted_user",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_group_restriction_with_superuser",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_login_restriction_with_anonymous_user",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_login_restriction_with_logged_in_user",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_set_shared_password_with_logged_in_user",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 168,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 172,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 178,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 179,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 180,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unset_shared_password_with_logged_in_user",
          "type": "decorated_definition",
          "line_start": 182,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 193,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 195,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 201,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 202,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 203,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_PRIVATE_COLLECTION_OPTIONS={\"SHARED_PASSWORD\": False}\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 14.5,
        "function_length_stddev": 17.9,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 196,
        "comment_ratio": 0.0392,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 8.36,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.107143,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.4,
        "mechanical": 73.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_site_summary.py",
      "language": "python",
      "line_count": 133,
      "token_estimate": 1224,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 81,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 15,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 15,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 64,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 70,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 81 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 81 lines (> 37 dynamic threshold)",
                "impact": "Function setUpTestData is 81 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3025,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_request",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "assertSummaryContains",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_site_name_is_shown",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_user_with_permissions_is_shown_panel",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_user_with_no_permissions_is_not_shown_panel",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 117,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_sees_proper_doc_count",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 129,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.12,
        "function_length_stddev": 27.21,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 123,
        "comment_ratio": 0.0752,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.07,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.073171,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.41,
        "mechanical": 79.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\bulk_actions\\delete.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 349,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1066,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4566,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1066,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 32,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4566,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 4.75,
        "function_length_stddev": 2.22,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 38,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.78,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.078947,
        "structural_uniformity": 0.5332,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.26,
        "mechanical": 80.26,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\facebook.py",
      "language": "python",
      "line_count": 104,
      "token_estimate": 923,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0222,
          "ai_signals": []
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 60,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 60,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 73,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 73,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 79,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 58,
              "description": "Function is 43 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 30 dynamic threshold)",
                "impact": "Function find_embed is 43 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3722,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 25,
        "function_length_stddev": 25.46,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 91,
        "comment_ratio": 0.125,
        "comment_what_ratio": 0.1111,
        "naming_avg_length": 7.18,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.087912,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.27,
        "mechanical": 64.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0004_embed_verbose_name_plural.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 100,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.8,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\oembed_providers.py",
      "language": "python",
      "line_count": 736,
      "token_estimate": 3999,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 736,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.55,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\fields.py",
      "language": "python",
      "line_count": 317,
      "token_estimate": 3369,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "clone",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 55,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 55,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3533,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "formfield",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 70,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2092,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__get__",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__set__",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 126,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.12,
          "ai_signals": []
        },
        {
          "name": "stream_block",
          "type": "decorated_definition",
          "line_start": 142,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 142,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function stream_block is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1876,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "json_field",
          "type": "decorated_definition",
          "line_start": 181,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_internal_type",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "get_lookup",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 189,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3533,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_transform",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 192,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3533,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "get_db_prep_value",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 242,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3533,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "from_db_value",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 259,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2367,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "formfield",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "get_default",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "value_to_string",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 291,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1978,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 306,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        },
        {
          "name": "contribute_to_class",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0033,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 29,
        "avg_function_length": 8.38,
        "function_length_stddev": 8.85,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 88,
        "code_lines": 229,
        "comment_ratio": 0.2776,
        "comment_what_ratio": 0.0167,
        "naming_avg_length": 7.01,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.048035,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.39,
        "mechanical": 86.39,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\api\\admin\\serializers.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 53,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\checks.py",
      "language": "python",
      "line_count": 57,
      "token_estimate": 337,
      "functions": [
        {
          "name": "has_jpeg_support",
          "type": "decorated_definition",
          "line_start": 8,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 16,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4224,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "has_png_support",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 30,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4224,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "image_library_check",
          "type": "decorated_definition",
          "line_start": 36,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1307,
          "ai_signals": [],
          "decorators": [
            "register(\"files\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 15,
        "function_length_stddev": 5.2,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 57,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.87,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.035088,
        "structural_uniformity": 0.6536,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.73,
        "mechanical": 89.73,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\jinja2tags.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 559,
      "functions": [
        {
          "name": "image",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.85)"
          ]
        },
        {
          "name": "srcset_image",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.85)"
          ]
        },
        {
          "name": "picture",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.85)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.17,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.85)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 13.75,
        "function_length_stddev": 2.06,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 74,
        "comment_ratio": 0.0133,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.38,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.8501,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.25,
        "mechanical": 92.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0004_make_focal_point_key_not_nullable.py",
      "language": "python",
      "line_count": 48,
      "token_estimate": 380,
      "functions": [
        {
          "name": "remove_duplicate_renditions",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 17,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "reverse_remove_duplicate_renditions",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 11,
        "function_length_stddev": 11.31,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 44,
        "comment_ratio": 0.0833,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.51,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.068182,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.9,
        "mechanical": 79.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0012_copy_image_permissions_to_collections.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 436,
      "functions": [
        {
          "name": "get_image_permissions",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 14,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.686,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "copy_image_permissions_to_collections",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 20,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 20,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 25,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 26,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.686,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "remove_image_permissions_from_collections",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 33,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 33,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.686,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9.67,
        "function_length_stddev": 4.04,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 51,
        "comment_ratio": 0.0192,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 11.18,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.313725,
        "structural_uniformity": 0.5819,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.33,
        "mechanical": 71.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0020_add-verbose-name.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 95,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\signal_handlers.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 368,
      "functions": [
        {
          "name": "post_delete_file_cleanup",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1676,
          "ai_signals": []
        },
        {
          "name": "post_delete_purge_rendition_cache",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1676,
          "ai_signals": []
        },
        {
          "name": "post_save_image_feature_detection",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 30,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5176,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 35,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 35,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 36,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 36,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5176,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.25,
        "function_length_stddev": 3.1,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 39,
        "comment_ratio": 0.0714,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 9.93,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.128205,
        "structural_uniformity": 0.5047,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.25,
        "mechanical": 72.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_bulk_actions\\test_bulk_add_to_collection.py",
      "language": "python",
      "line_count": 168,
      "token_estimate": 1464,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 34,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.253,
          "ai_signals": []
        },
        {
          "name": "test_add_to_collection_with_limited_permissions",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 42,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 50,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4439,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4439,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_to_collection",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 81,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3855,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0939,
          "ai_signals": []
        },
        {
          "name": "test_add_all_to_collection_with_limited_permissions",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 119,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 122,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 135,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 138,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 144,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 109,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_all_to_collection_with_limited_permissions is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4439,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 153,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4439,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_all_to_collection",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 164,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3855,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 18,
        "function_length_stddev": 11.35,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 158,
        "comment_ratio": 0.0595,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.094937,
        "structural_uniformity": 0.3694,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.8,
        "mechanical": 69.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_rich_text.py",
      "language": "python",
      "line_count": 157,
      "token_estimate": 1365,
      "functions": [
        {
          "name": "test_get_db_attributes",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 42,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 42,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4581,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_editor_nonexistent_image",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor_escapes_alt_text",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 66,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 66,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4581,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_editor_with_missing_alt",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 85,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 85,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4581,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_frontend",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_frontend_with_nonexistent_image",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_frontend_escapes_alt_text",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_frontend_with_missing_alt",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 140,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 140,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4581,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chooser_urls_exist",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1081,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 11.36,
        "function_length_stddev": 5.22,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 157,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.94,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.050955,
        "structural_uniformity": 0.5406,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.85,
        "mechanical": 86.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\utils.py",
      "language": "python",
      "line_count": 94,
      "token_estimate": 726,
      "functions": [
        {
          "name": "get_test_image_filename",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file_avif",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file_jpeg",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file_webp",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file_tiff",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        },
        {
          "name": "get_test_image_file_svg",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 63,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4607,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_test_bad_image",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1425,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 8.25,
        "function_length_stddev": 5.12,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 65,
        "comment_ratio": 0.3085,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 6.06,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.015385,
        "structural_uniformity": 0.3794,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.47,
        "mechanical": 95.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\bulk_actions\\image_bulk_action.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 332,
      "functions": [
        {
          "name": "get_all_objects_in_listing_query",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 10,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 10,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 21,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 21,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5299,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.89)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1799,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.89)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 37,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.1,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.108108,
        "structural_uniformity": 0.8912,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.1,
        "mechanical": 70.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\log_actions.py",
      "language": "python",
      "line_count": 186,
      "token_estimate": 1432,
      "functions": [
        {
          "name": "format_message",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "format_comment",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "__enter__",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "__exit__",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "activate",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "deactivate",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "get_active_log_context",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 86,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 92,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 92,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 92,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "scan_for_actions",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 97,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_model",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 102,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 102,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 102,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 102,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 102,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 102,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 102,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 103,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 103,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 103,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 104,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_action",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 113,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 117,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_choices",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "get_formatter",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "action_exists",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "get_log_entry_models",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "get_action_label",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 142,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_log_model_for_model",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 144,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 144,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 144,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_log_model_for_instance",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 153,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 153,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 153,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4179,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "log",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "get_logs_for_instance",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        },
        {
          "name": "log",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0679,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 22,
        "avg_function_length": 5.23,
        "function_length_stddev": 4.66,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 158,
        "comment_ratio": 0.1505,
        "comment_what_ratio": 0.2308,
        "naming_avg_length": 7.63,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.177215,
        "structural_uniformity": 0.1087,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.0,
        "mechanical": 73.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\publish_scheduled_pages.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 61,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 7,
        "comment_ratio": 0.3,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.07,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0002_initial_data.py",
      "language": "python",
      "line_count": 110,
      "token_estimate": 766,
      "functions": [
        {
          "name": "initial_data",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4737,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_initial_data",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 84,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2759,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 46.5,
        "function_length_stddev": 33.23,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 24,
        "code_lines": 86,
        "comment_ratio": 0.2182,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.32,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.139535,
        "structural_uniformity": 0.2853,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.05,
        "mechanical": 64.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0010_change_page_owner_to_null_on_delete.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 168,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0018_pagerevision_submitted_for_moderation_index.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 118,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0025_collection_initial_data.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 120,
      "functions": [
        {
          "name": "initial_data",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.55,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.17,
        "mechanical": 79.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0033_remove_golive_expiry_help_text.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 177,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0041_group_collection_permissions_verbose_name_plural.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 127,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0049_taskstate_finished_by.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 198,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 28,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0057_page_locale_fields_notnull.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 198,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0065_log_entry_uuid.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 238,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 33,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0073_page_latest_revision.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 180,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0081_populate_workflowstate_content_type.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 318,
      "functions": [
        {
          "name": "populate_workflowstate_content_type",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 12,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 13,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 21,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3565,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "empty_workflowstate_content_type",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 26,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 26,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3565,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9.5,
        "function_length_stddev": 9.19,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.95,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.268293,
        "structural_uniformity": 0.0324,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0089_log_entry_data_json_null_to_object.py",
      "language": "python",
      "line_count": 48,
      "token_estimate": 459,
      "functions": [
        {
          "name": "replace_json_null_with_empty_object",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 27,
        "comment_ratio": 0.4375,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.37,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.148148,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0097_baselogentry_uuid_action_timestamp_indexes.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 225,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.02,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\i18n.py",
      "language": "python",
      "line_count": 485,
      "token_estimate": 4052,
      "functions": [
        {
          "name": "pk",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_for_language",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_default",
          "type": "decorated_definition",
          "line_start": 56,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_active",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 70,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "delete",
          "type": "decorated_definition",
          "line_start": 73,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "language_code_is_valid",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_display_name",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 88,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 92,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "_get_language_info",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "language_info",
          "type": "decorated_definition",
          "line_start": 103,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "language_name",
          "type": "decorated_definition",
          "line_start": 107,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "language_name_local",
          "type": "decorated_definition",
          "line_start": 119,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "language_name_localized",
          "type": "decorated_definition",
          "line_start": 131,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_bidi",
          "type": "decorated_definition",
          "line_start": 145,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_default",
          "type": "decorated_definition",
          "line_start": 152,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 161,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.385,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_active",
          "type": "decorated_definition",
          "line_start": 164,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 173,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.385,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 192,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 197,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 197,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 216,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 222,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 237,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 192,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function check is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "localized",
          "type": "decorated_definition",
          "line_start": 246,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "localized_draft",
          "type": "decorated_definition",
          "line_start": 264,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 279,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.226,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_translation",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_translation_or_none",
          "type": "function_definition",
          "line_start": 308,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "has_translation",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "copy_for_translation",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_default_locale",
          "type": "function_definition",
          "line_start": 339,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "get_translation_model",
          "type": "decorated_definition",
          "line_start": 366,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 367,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 367,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "bootstrap_translatable_model",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 380,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 380,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 404,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 404,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 405,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 405,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 408,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 408,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 437,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_translatable_models",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 462,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 463,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 463,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 463,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "set_locale_on_new_instance",
          "type": "decorated_definition",
          "line_start": 472,
          "line_end": 484,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": [],
          "decorators": [
            "receiver(pre_save)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 31,
        "avg_function_length": 11.84,
        "function_length_stddev": 9.75,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 140,
        "code_lines": 345,
        "comment_ratio": 0.2887,
        "comment_what_ratio": 0.1579,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 26,
        "ai_smell_density": 0.075362,
        "structural_uniformity": 0.1764,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.17,
        "mechanical": 79.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\revisions.py",
      "language": "python",
      "line_count": 493,
      "token_estimate": 4514,
      "functions": [
        {
          "name": "page_revisions_q",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "page_revisions",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "not_page_revisions",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 47,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 50,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "previous_revision_id_subquery",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 58,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 58,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 67,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "base_content_object",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 130,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function save is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1268,
          "ai_signals": []
        },
        {
          "name": "as_object",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "is_latest_revision",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "publish",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "get_previous",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "get_next",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "revisions",
          "type": "decorated_definition",
          "line_start": 288,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_base_content_type",
          "type": "decorated_definition",
          "line_start": 301,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 307,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 312,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 312,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_content_type",
          "type": "decorated_definition",
          "line_start": 314,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 316,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 316,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_latest_revision",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "get_latest_revision_as_object",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "serializable_data",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 334,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "from_serializable_data",
          "type": "decorated_definition",
          "line_start": 337,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 341,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "with_content_json",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 351,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 351,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 352,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 352,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 359,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 359,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 370,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 370,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.387,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_update_from_revision",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        },
        {
          "name": "save_revision",
          "type": "decorated_definition",
          "line_start": 383,
          "line_end": 489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 107,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 383,
              "description": "Function is 107 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 107 lines (> 37 dynamic threshold)",
                "impact": "Function save_revision is 107 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0698,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 13.64,
        "function_length_stddev": 21.78,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 90,
        "code_lines": 403,
        "comment_ratio": 0.1826,
        "comment_what_ratio": 0.1852,
        "naming_avg_length": 7.91,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.054591,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.72,
        "mechanical": 83.72,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permission_policies\\pages.py",
      "language": "python",
      "line_count": 216,
      "token_estimate": 2153,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "get_all_permissions_for_user",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "_base_user_has_permission",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "_base_queryset_for_user",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 47,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3023,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 59,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 70,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 70,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4189,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "users_with_permission",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 90,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 96,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4189,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 106,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2356,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 149,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 149,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2877,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "instances_with_direct_explore_permission",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "explorable_root_instance",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0689,
          "ai_signals": []
        },
        {
          "name": "explorable_instances",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 209,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2148,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 11.81,
        "function_length_stddev": 9.22,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 200,
        "comment_ratio": 0.0741,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 8.58,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.055,
        "structural_uniformity": 0.2197,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.64,
        "mechanical": 79.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\home\\models.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 23,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from django.db import models",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'models' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from django.db import models",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\project_name\\urls.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 311,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 29,
        "comment_ratio": 0.1944,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\rich_text\\rewriters.py",
      "language": "python",
      "line_count": 243,
      "token_estimate": 2013,
      "functions": [
        {
          "name": "extract_attrs",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 21,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2875,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "start",
          "type": "decorated_definition",
          "line_start": 43,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "end",
          "type": "decorated_definition",
          "line_start": 47,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_opening_tag_regex",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_tag_type_from_attrs",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_tag_replacements",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 78,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extract_tags",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 114,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2434,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "convert_rule_to_bulk_rule",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 130,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3292,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_opening_tag_regex",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_tag_type_from_attrs",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_tag_replacements",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 158,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 164,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_opening_tag_regex",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "get_tag_type_from_attrs",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 186,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2708,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get_tag_replacements",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 208,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 214,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2875,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 236,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 241,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 22,
        "avg_function_length": 8.18,
        "function_length_stddev": 8.46,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 44,
        "code_lines": 199,
        "comment_ratio": 0.1811,
        "comment_what_ratio": 0.1875,
        "naming_avg_length": 6.82,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.065327,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.67,
        "mechanical": 79.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\mysql\\mysql.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 17,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.43,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\sqlite\\sqlite.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 18,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\index.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 11,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0004_querydailyhits_verbose_name_plural.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 120,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.25,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\query.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 11,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\apps.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 352,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 18,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 17,
        "comment_ratio": 0.4138,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 6.74,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.6,
        "mechanical": 97.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_chooser_widget.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 168,
      "functions": [
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 15,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 11,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.25,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.043478,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.83,
        "mechanical": 88.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_list_view.py",
      "language": "python",
      "line_count": 789,
      "token_estimate": 7811,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 36,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 36,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 45,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 46,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3915,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_with_edit_permission_only",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 67,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 89,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_pagination",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 96,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_displays_add_button",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_not_searchable",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_register_snippet_listing_buttons_hook_deprecated_class",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 128,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 130,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 104,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_register_snippet_listing_buttons_hook_deprecated_class is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3496,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ]
        },
        {
          "name": "test_register_snippet_listing_buttons_hook",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 169,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 171,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 143,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_register_snippet_listing_buttons_hook is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3066,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_register_snippet_listing_buttons_hook_with_dropdown",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 197,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 208,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 210,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 220,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 189,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_register_snippet_listing_buttons_hook_with_dropdown is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_snippet_listing_buttons_hook",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 235,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 239,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 241,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_snippet_listing_buttons_hook_contains_default_buttons",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 270,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2399,
          "ai_signals": []
        },
        {
          "name": "test_dropdown_not_rendered_when_no_child_buttons_exist",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 286,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.292,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_use_latest_draft_as_title",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_use_fallback_for_blank_string_representation",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_use_fallback_for_blank_title_field",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_bulk_action_rendered",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 379,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 371,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 372,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 378,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 384,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "_add_snippets",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "decorated_definition",
          "line_start": 397,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 406,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.194,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"ar\", \"Arabic\"),\n            (\"en\", \"English\"),\n            (\"fr\", \"French\"),\n        ]\n    )"
          ]
        },
        {
          "name": "test_no_locale_filter_when_only_one_locale",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 430,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3649,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 440,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 443,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 450,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_on_non_translatable_snippet",
          "type": "function_definition",
          "line_start": 460,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 462,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 469,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_column",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 482,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 483,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 484,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 486,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_column_not_present_with_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 490,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 494,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 495,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 496,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_column_not_present_for_non_translatable_snippet",
          "type": "function_definition",
          "line_start": 498,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 501,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 502,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 503,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 507,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 509,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 516,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 516,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 517,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_listing_orderable_columns_with_no_mixin",
          "type": "function_definition",
          "line_start": 527,
          "line_end": 547,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 535,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 539,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 545,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_listing_orderable_columns_with_draft_state_mixin",
          "type": "function_definition",
          "line_start": 549,
          "line_end": 569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 557,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 561,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 567,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_updated_at_with_no_mixin",
          "type": "function_definition",
          "line_start": 571,
          "line_end": 595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 578,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 580,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 581,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 591,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 592,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_updated_at_with_draft_state_mixin",
          "type": "function_definition",
          "line_start": 597,
          "line_end": 621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 604,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 606,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 607,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 617,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 618,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_live",
          "type": "function_definition",
          "line_start": 623,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 630,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 632,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 644,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 652,
          "line_end": 658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 660,
          "line_end": 664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 666,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 669,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 672,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_q",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 683,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 686,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_is_searchable",
          "type": "function_definition",
          "line_start": 694,
          "line_end": 695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_search_hello",
          "type": "function_definition",
          "line_start": 697,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 701,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_world_autocomplete",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 706,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 710,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 725,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 735,
          "line_end": 741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_search_hello",
          "type": "function_definition",
          "line_start": 743,
          "line_end": 753,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 750,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3915,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 769,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 771,
          "line_end": 777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0733,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 779,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 782,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 785,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4233,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 49,
        "avg_function_length": 14.02,
        "function_length_stddev": 10.5,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 150,
        "code_lines": 639,
        "comment_ratio": 0.1901,
        "comment_what_ratio": 0.1154,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 80,
        "ai_smell_density": 0.125196,
        "structural_uniformity": 0.251,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.87,
        "mechanical": 72.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_unpublish_view.py",
      "language": "python",
      "line_count": 229,
      "token_estimate": 2129,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_view",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 34,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unpublish_view_invalid_pk",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_view_get_bad_permissions",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3593,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_unpublish_view_post_bad_permissions",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 83,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.271,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_view_post_with_publish_permission",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 117,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 125,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 104,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_unpublish_view_post_with_publish_permission is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4194,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "test_unpublish_view_post",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": []
        },
        {
          "name": "test_after_unpublish_hook",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 207,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3837,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_before_unpublish",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 226,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 226,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 22.89,
        "function_length_stddev": 15.0,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 44,
        "code_lines": 185,
        "comment_ratio": 0.1921,
        "comment_what_ratio": 0.48,
        "naming_avg_length": 8.17,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.059459,
        "structural_uniformity": 0.3445,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.6,
        "mechanical": 79.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\wagtail_hooks.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 328,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0564,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "_snippets_in_index_view",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0564,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0564,
          "ai_signals": []
        },
        {
          "name": "register_snippets_menu_item",
          "type": "decorated_definition",
          "line_start": 35,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0564,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.5,
        "function_length_stddev": 4.8,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 47,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2622,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\apps.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 44,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\migrations\\0003_delete_emailuser.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 74,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\demosite\\migrations\\0002_capitalizeverbose.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 73,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\i18n\\apps.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 38,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\non_root_urls.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 139,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 15,
        "comment_ratio": 0.1176,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.37,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\settings.py",
      "language": "python",
      "line_count": 313,
      "token_estimate": 2752,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 283,
        "comment_ratio": 0.0958,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 8.11,
        "debug_artifacts": [
          "print line 91",
          "print line 223"
        ],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.0,
        "mechanical": 96.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0004_fileuploadsnippet.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 179,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.55,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0012_alter_translatablesnippet_locale.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 154,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.53,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\streamfield_migrations\\testutils.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 367,
      "functions": [
        {
          "name": "init_migration",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2282,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "apply_migration",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2282,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 15,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 44,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.5,
        "mechanical": 98.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0002_recreate_setting_models.py",
      "language": "python",
      "line_count": 387,
      "token_estimate": 3062,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 386,
        "comment_ratio": 0.0026,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.34,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0010_alter_customimage_file_and_more.py",
      "language": "python",
      "line_count": 72,
      "token_estimate": 584,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 71,
        "comment_ratio": 0.0139,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0018_alter_streampage_body.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 424,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 51,
        "comment_ratio": 0.0192,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0026_featurecompletetoy.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 199,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 29,
        "comment_ratio": 0.0333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0034_custompermissionmodel.py",
      "language": "python",
      "line_count": 45,
      "token_estimate": 350,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 44,
        "comment_ratio": 0.0222,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.2,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0042_alter_customdocument_file_size_and_more.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 208,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 28,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0050_headcountrelatedmodelusingpk_related_page.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 172,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0058_customlocktask.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 212,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 31,
        "comment_ratio": 0.0312,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\views.py",
      "language": "python",
      "line_count": 405,
      "token_estimate": 2931,
      "functions": [
        {
          "name": "user_is_called_bob",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "bob_only_zone",
          "type": "decorated_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": [],
          "decorators": [
            "user_passes_test(user_is_called_bob)"
          ]
        },
        {
          "name": "message_test",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_csv_filename",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "index",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "month",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "index",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_name_display_value",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_index_view_kwargs",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get_object_list",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "hero",
          "type": "function_definition",
          "line_start": 357,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "heroine",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "play_view",
          "type": "decorated_definition",
          "line_start": 370,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "hero",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        },
        {
          "name": "heroine",
          "type": "function_definition",
          "line_start": 385,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0475,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 4,
        "function_length_stddev": 3.05,
        "import_count": 21,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 402,
        "comment_ratio": 0.0074,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.63,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2376,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.74,
        "mechanical": 99.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\page_tests.py",
      "language": "python",
      "line_count": 458,
      "token_estimate": 4479,
      "functions": [
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0115,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_testCanCreateAt",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0115,
          "ai_signals": []
        },
        {
          "name": "assertCanCreateAt",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertCanNotCreateAt",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 66,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertCanCreate",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 90,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 99,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 107,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 124,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 72,
              "description": "Function is 75 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 30 dynamic threshold)",
                "impact": "Function assertCanCreate is 75 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3381,
          "ai_signals": [
            "High anti-pattern density (0.93)"
          ]
        },
        {
          "name": "assertAllowedSubpageTypes",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0115,
          "ai_signals": []
        },
        {
          "name": "assertAllowedParentPageTypes",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0115,
          "ai_signals": []
        },
        {
          "name": "assertPageIsRoutable",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 177,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 178,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 174,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function assertPageIsRoutable is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2676,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "assertPageIsRenderable",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 2,
            "parameter_count": 8,
            "line_count": 80,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 219,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 223,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 224,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 225,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 239,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 241,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 260,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 260,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 216,
              "description": "Function is 80 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 80 lines (> 30 dynamic threshold)",
                "impact": "Function assertPageIsRenderable is 80 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertPageIsEditable",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 80,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 302,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 336,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 336,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 361,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 367,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 367,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 297,
              "description": "Function is 80 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 80 lines (> 30 dynamic threshold)",
                "impact": "Function assertPageIsEditable is 80 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3177,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "assertPageIsPreviewable",
          "type": "function_definition",
          "line_start": 378,
          "line_end": 451,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 381,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 384,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 419,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 422,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 422,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 438,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 438,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 378,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function assertPageIsPreviewable is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0115,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 34.92,
        "function_length_stddev": 32.91,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 76,
        "code_lines": 382,
        "comment_ratio": 0.1659,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.5,
        "debug_artifacts": [],
        "ai_smell_count": 38,
        "ai_smell_density": 0.099476,
        "structural_uniformity": 0.0573,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.28,
        "mechanical": 59.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_tests.py",
      "language": "python",
      "line_count": 258,
      "token_estimate": 2299,
      "functions": [
        {
          "name": "get_soup",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1051,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "create_test_user",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 29,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "login",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3968,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "create_user",
          "type": "decorated_definition",
          "line_start": 60,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 62,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 62,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 64,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 64,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "create_superuser",
          "type": "decorated_definition",
          "line_start": 73,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 77,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 77,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "ignore_deprecation_warnings",
          "type": "decorated_definition",
          "line_start": 86,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2894,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "staticmethod",
            "contextmanager"
          ]
        },
        {
          "name": "register_hook",
          "type": "decorated_definition",
          "line_start": 106,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1051,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "_tag_is_equal",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 127,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2718,
          "ai_signals": []
        },
        {
          "name": "_tag_matches_with_extra_attrs",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 145,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2642,
          "ai_signals": []
        },
        {
          "name": "_count_tag_occurrences",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1051,
          "ai_signals": []
        },
        {
          "name": "_tag_is_template_script",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1051,
          "ai_signals": []
        },
        {
          "name": "_find_template_script_tags",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 193,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertTagInHTML",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 197,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 212,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 218,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertNotInHTML",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 221,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 222,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertTagInTemplateScript",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 224,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 233,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 248,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 256,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 15.6,
        "function_length_stddev": 8.96,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 235,
        "comment_ratio": 0.0891,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 7.49,
        "debug_artifacts": [],
        "ai_smell_count": 26,
        "ai_smell_density": 0.110638,
        "structural_uniformity": 0.4257,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 65.29,
        "mechanical": 65.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_bad_data.py",
      "language": "python",
      "line_count": 266,
      "token_estimate": 2358,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "test_rename_invalid_stream_child",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "test_rename_invalid_struct_child",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "create_instance",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "append_invalid_instance_data",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "create_invalid_revision",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "create_revision",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "test_migrate",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4248,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_migrate",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 210,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3759,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_migrate",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 240,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4567,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_migrate",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1067,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 12.67,
        "function_length_stddev": 5.91,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 17,
        "code_lines": 249,
        "comment_ratio": 0.0639,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.1,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.012048,
        "structural_uniformity": 0.5333,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.09,
        "mechanical": 93.09,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_collection_model.py",
      "language": "python",
      "line_count": 124,
      "token_estimate": 1287,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_alphabetic_sorting",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_get_ancestors",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_get_descendants",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_get_siblings",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_get_next_siblings",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_get_prev_siblings",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        },
        {
          "name": "test_collection_natural_key",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1863,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.81)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 13.75,
        "function_length_stddev": 2.66,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 115,
        "comment_ratio": 0.0726,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 9.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.8066,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.88,
        "mechanical": 98.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_lockable_model.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 470,
      "functions": [
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 11,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 14,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lockable_mixin_only",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_incorrect_revision_mixin_order",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_correct_revision_mixin_order",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 10.5,
        "function_length_stddev": 6.4,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 52,
        "comment_ratio": 0.0545,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.67,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.096154,
        "structural_uniformity": 0.3902,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.31,
        "mechanical": 72.31,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_queryset.py",
      "language": "python",
      "line_count": 1370,
      "token_estimate": 13026,
      "functions": [
        {
          "name": "test_live",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 29,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_live",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 40,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_in_menu",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 51,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_in_menu",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 62,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_not_page",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 90,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_inclusive",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 98,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4265,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_not_descendant_of",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 112,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_descendant_of_inclusive",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 123,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 134,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_not_child_of",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 142,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_ancestor_of_inclusive",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_not_ancestor_of",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 173,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4265,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_not_ancestor_of_inclusive",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 187,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_parent_of",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_not_parent_of",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 207,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_sibling_of_default",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 223,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_sibling_of_exclusive",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 235,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_sibling_of_inclusive",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 247,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_not_sibling_of_default",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 264,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3415,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_not_sibling_of_exclusive",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 279,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_not_sibling_of_inclusive",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 295,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4073,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_type",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 308,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_type_with_multiple_models",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 324,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3415,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_not_type",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 344,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4073,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_not_type_with_multiple_models",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 359,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4073,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_exact_type",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 374,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_exact_type_with_multiple_models",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 390,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3031,
          "ai_signals": []
        },
        {
          "name": "test_not_exact_type",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 415,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_not_exact_type_with_multiple_models",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 431,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.376,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_public",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_not_public",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 484,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_private",
          "type": "function_definition",
          "line_start": 486,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_private_with_no_private_page",
          "type": "function_definition",
          "line_start": 507,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_merge_queries",
          "type": "function_definition",
          "line_start": 513,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_delete_queryset",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_delete_is_not_available_on_manager",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_translation_of",
          "type": "function_definition",
          "line_start": 529,
          "line_end": 553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_not_translation_of",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 574,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 587,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3464,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_prefetch_workflow_states",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 648,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 596,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 596,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 603,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 620,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 627,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 593,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_prefetch_workflow_states is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 654,
          "line_end": 674,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_in_site",
          "type": "function_definition",
          "line_start": 676,
          "line_end": 681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 688,
          "line_end": 701,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 688,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 688,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 689,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 689,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_operators",
          "type": "function_definition",
          "line_start": 703,
          "line_end": 725,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 704,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 704,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 715,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 715,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_order",
          "type": "function_definition",
          "line_start": 727,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 728,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 742,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4073,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_unpublish",
          "type": "function_definition",
          "line_start": 756,
          "line_end": 789,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 817,
          "line_end": 821,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific",
          "type": "function_definition",
          "line_start": 823,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 838,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2919,
          "ai_signals": []
        },
        {
          "name": "test_filtering_before_specific",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_filtering_after_specific",
          "type": "function_definition",
          "line_start": 872,
          "line_end": 893,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_query_with_annotations_performs_no_additional_queries",
          "type": "function_definition",
          "line_start": 895,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_query_with_annotation",
          "type": "function_definition",
          "line_start": 906,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_subquery_select_related",
          "type": "function_definition",
          "line_start": 923,
          "line_end": 933,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 932,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_specific_subquery_select_related_without_fields",
          "type": "function_definition",
          "line_start": 935,
          "line_end": 939,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_subquery_select_related_negation",
          "type": "function_definition",
          "line_start": 941,
          "line_end": 953,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 952,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4265,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_specific_subquery_prefetch_related",
          "type": "function_definition",
          "line_start": 955,
          "line_end": 965,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 964,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4754,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_specific_subquery_prefetch_related_without_lookups",
          "type": "function_definition",
          "line_start": 967,
          "line_end": 969,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_subquery_prefetch_related_negation",
          "type": "function_definition",
          "line_start": 971,
          "line_end": 984,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 983,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4073,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_specific_subquery_select_related_and_prefetch_related",
          "type": "function_definition",
          "line_start": 986,
          "line_end": 1000,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 998,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3906,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_specific_query_with_alias",
          "type": "function_definition",
          "line_start": 1002,
          "line_end": 1019,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_specific_gracefully_handles_missing_models",
          "type": "function_definition",
          "line_start": 1021,
          "line_end": 1042,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1027,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3164,
          "ai_signals": []
        },
        {
          "name": "test_specific_gracefully_handles_missing_rows",
          "type": "function_definition",
          "line_start": 1044,
          "line_end": 1069,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1051,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1051,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1044,
              "description": "Function is 26 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 26 lines (> 22 dynamic threshold)",
                "impact": "Function test_specific_gracefully_handles_missing_rows is 26 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deferred_specific_query",
          "type": "function_definition",
          "line_start": 1071,
          "line_end": 1111,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 1071,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1071,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1093,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1071,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_deferred_specific_query is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4987,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ]
        },
        {
          "name": "test_specific_query_with_iterator",
          "type": "function_definition",
          "line_start": 1113,
          "line_end": 1139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 1128,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1131,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1138,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_bottom_sliced_specific_query_with_iterator",
          "type": "function_definition",
          "line_start": 1141,
          "line_end": 1160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1159,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3323,
          "ai_signals": []
        },
        {
          "name": "test_top_sliced_specific_query_with_iterator",
          "type": "function_definition",
          "line_start": 1162,
          "line_end": 1181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1180,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3323,
          "ai_signals": []
        },
        {
          "name": "test_top_and_bottom_sliced_specific_query_with_iterator",
          "type": "function_definition",
          "line_start": 1183,
          "line_end": 1202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1201,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3323,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1209,
          "line_end": 1220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1214,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4489,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_specific_query_with_match_all_search_and_annotation",
          "type": "function_definition",
          "line_start": 1222,
          "line_end": 1231,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1226,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1226,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1230,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_specific_query_with_real_search_and_annotation",
          "type": "function_definition",
          "line_start": 1233,
          "line_end": 1242,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1237,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1237,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1241,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_specific_query_with_search",
          "type": "function_definition",
          "line_start": 1244,
          "line_end": 1263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1244,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1244,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1252,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1252,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1274,
          "line_end": 1279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "_create_streampage",
          "type": "function_definition",
          "line_start": 1281,
          "line_end": 1287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_bookkeeping",
          "type": "function_definition",
          "line_start": 1289,
          "line_end": 1291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_event_pages",
          "type": "function_definition",
          "line_start": 1293,
          "line_end": 1299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_normal_event_pages",
          "type": "function_definition",
          "line_start": 1301,
          "line_end": 1305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_normal_event_pages_include_self",
          "type": "function_definition",
          "line_start": 1307,
          "line_end": 1315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_single_page_no_include_self",
          "type": "function_definition",
          "line_start": 1317,
          "line_end": 1322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_single_page_include_self",
          "type": "function_definition",
          "line_start": 1324,
          "line_end": 1331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_all_pages",
          "type": "function_definition",
          "line_start": 1333,
          "line_end": 1336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_all_pages_strict",
          "type": "function_definition",
          "line_start": 1338,
          "line_end": 1340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_all_pages_include_self_strict",
          "type": "function_definition",
          "line_start": 1342,
          "line_end": 1346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_empty_queryset",
          "type": "function_definition",
          "line_start": 1348,
          "line_end": 1351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_empty_queryset_strict",
          "type": "function_definition",
          "line_start": 1353,
          "line_end": 1355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_defer_streamfields_without_specific",
          "type": "function_definition",
          "line_start": 1357,
          "line_end": 1362,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1359,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_defer_streamfields_with_specific",
          "type": "function_definition",
          "line_start": 1364,
          "line_end": 1369,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1366,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5073,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 88,
        "avg_function_length": 13.74,
        "function_length_stddev": 9.17,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 218,
        "code_lines": 1152,
        "comment_ratio": 0.1591,
        "comment_what_ratio": 0.4535,
        "naming_avg_length": 7.11,
        "debug_artifacts": [],
        "ai_smell_count": 79,
        "ai_smell_density": 0.068576,
        "structural_uniformity": 0.3328,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.88,
        "mechanical": 77.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_streamfield.py",
      "language": "python",
      "line_count": 1217,
      "token_estimate": 11869,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 39,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 51,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3642,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_lazy_load",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_slice",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_lazy_load_no_images",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_lazy_load_queryset",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_lazy_load_queryset_bulk",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 146,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 147,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 148,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3814,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_lazy_load_get_prep_value",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 188,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 188,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 188,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 190,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 193,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_system_check_validates_block",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 215,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_assign_as_list",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 220,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 221,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 224,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_normalize_on_assign",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 231,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 232,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 235,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_append",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 242,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 243,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 245,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_normalize_on_append",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 254,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 255,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 257,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_normalize_on_replace",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 267,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 268,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 270,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_append_on_queried_instance",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 283,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 284,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 285,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 287,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_complex_assignment",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_default_value",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_creation_form_with_initial_instance",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_creation_form_without_initial_instance",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 363,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2126,
          "ai_signals": []
        },
        {
          "name": "test_to_string",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test___html___access",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_non_blank_field_is_required",
          "type": "function_definition",
          "line_start": 415,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_blank_false_is_implied_by_default",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 479,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_blank_field_is_not_required",
          "type": "function_definition",
          "line_start": 481,
          "line_end": 508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 518,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_minmax_pass_to_block",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 526,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_counts_pass_to_block",
          "type": "function_definition",
          "line_start": 528,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_minimum_count",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_minimum_count_disregarded_when_deferring_validation",
          "type": "function_definition",
          "line_start": 552,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_maximum_count_respected_when_deferring_validation",
          "type": "function_definition",
          "line_start": 575,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_maximum_count",
          "type": "function_definition",
          "line_start": 603,
          "line_end": 617,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_block_counts_minimums",
          "type": "function_definition",
          "line_start": 619,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_block_counts_maximums",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_block_count_minimum_disregarded_when_deferring_validation",
          "type": "function_definition",
          "line_start": 683,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_block_count_maximum_respected_when_deferring_validation",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_streamfield_count_argument_precedence",
          "type": "function_definition",
          "line_start": 731,
          "line_end": 767,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 771,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_internal_type",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 780,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_json_body_equals_to_text_body",
          "type": "function_definition",
          "line_start": 782,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_json_body_create_preserialised_value",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_json_contains_lookup",
          "type": "decorated_definition",
          "line_start": 799,
          "line_end": 806,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 802,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "skipUnlessDBFeature(\"supports_json_field_contains\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 810,
          "line_end": 812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_pickle_support",
          "type": "function_definition",
          "line_start": 814,
          "line_end": 828,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 832,
          "line_end": 859,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_get_block_by_content_path",
          "type": "function_definition",
          "line_start": 861,
          "line_end": 889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_construct_block_list_from_lookup",
          "type": "function_definition",
          "line_start": 893,
          "line_end": 937,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 893,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_construct_block_list_from_lookup is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1503,
          "ai_signals": []
        },
        {
          "name": "test_construct_top_level_block_from_lookup",
          "type": "function_definition",
          "line_start": 939,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 939,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_construct_top_level_block_from_lookup is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1399,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 996,
          "line_end": 997,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct",
          "type": "function_definition",
          "line_start": 1001,
          "line_end": 1049,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1001,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_deconstruct is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.144,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_listblock",
          "type": "function_definition",
          "line_start": 1051,
          "line_end": 1081,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_listblock_with_child_block_kwarg",
          "type": "function_definition",
          "line_start": 1083,
          "line_end": 1116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_listblock_with_child_block_kwarg_idempotence",
          "type": "function_definition",
          "line_start": 1118,
          "line_end": 1164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1118,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_deconstruct_with_listblock_with_child_block_kwarg_idempotence is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.147,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct_with_listblock_subclass",
          "type": "function_definition",
          "line_start": 1166,
          "line_end": 1202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1170,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1170,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2617,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_non_streamblock_raises_correct_error",
          "type": "function_definition",
          "line_start": 1206,
          "line_end": 1216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0726,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 62,
        "avg_function_length": 17.55,
        "function_length_stddev": 13.34,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 96,
        "code_lines": 1121,
        "comment_ratio": 0.0789,
        "comment_what_ratio": 0.1233,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 39,
        "ai_smell_density": 0.03479,
        "structural_uniformity": 0.2395,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.22,
        "mechanical": 88.22,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\tests.py",
      "language": "python",
      "line_count": 905,
      "token_estimate": 8034,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_pageurl_tag",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_pageurl_with_named_url_fallback",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 50,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pageurl_with_get_absolute_url_object_fallback",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 61,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3739,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_pageurl_with_valid_url_string_fallback",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 80,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3427,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_pageurl_with_invalid_url_string_fallback",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 90,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 90,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_slugurl_tag",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_pageurl_without_request_in_context",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 108,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 112,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pageurl_caches",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 126,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 130,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pageurl_with_unknown_site",
          "type": "decorated_definition",
          "line_start": 133,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 133,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 133,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 144,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"testserver\", \"localhost\", \"unknown.example.com\"])"
          ]
        },
        {
          "name": "test_bad_pageurl",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_bad_slugurl",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 159,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4421,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_slugurl_tag_returns_url_for_current_site",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 169,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 169,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"testserver\", \"localhost\", \"site2.example.com\"])"
          ]
        },
        {
          "name": "test_slugurl_tag_returns_url_for_other_site",
          "type": "decorated_definition",
          "line_start": 186,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 186,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 186,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"testserver\", \"localhost\", \"site2.example.com\"])"
          ]
        },
        {
          "name": "test_slugurl_without_request_in_context",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 203,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4421,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_slugurl_with_null_site_in_request",
          "type": "decorated_definition",
          "line_start": 213,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 213,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 213,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 218,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"testserver\", \"localhost\", \"unknown.example.com\"])"
          ]
        },
        {
          "name": "test_fullpageurl",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 227,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fullpageurl_with_named_url_fallback",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 235,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fullpageurl_with_absolute_fallback",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 243,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fullpageurl_with_invalid_page",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_pageurl_with_invalid_page",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_wagtail_site_tag",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 272,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_wagtail_site_tag_with_missing_request_context",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 279,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_cached_site_root_paths",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_backend_uses_json_serialization",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_clears_when_site_saved",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_clears_when_site_deleted",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_clears_when_site_root_moves",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 403,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_cache_clears_when_site_root_moves is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2137,
          "ai_signals": []
        },
        {
          "name": "test_cache_clears_when_site_root_slug_changes",
          "type": "function_definition",
          "line_start": 443,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_clears_when_site_root_is_translated_as_alias",
          "type": "decorated_definition",
          "line_start": 473,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_resolve_from_string",
          "type": "function_definition",
          "line_start": 491,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_with_default_app",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_with_different_default_app",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_class",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_invalid",
          "type": "function_definition",
          "line_start": 511,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_with_incorrect_default_app",
          "type": "function_definition",
          "line_start": 514,
          "line_end": 517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_with_unknown_model_string",
          "type": "function_definition",
          "line_start": 519,
          "line_end": 520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_string_with_no_default_app",
          "type": "function_definition",
          "line_start": 522,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_class_that_isnt_a_model",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 525,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 525,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_resolve_from_bad_type",
          "type": "function_definition",
          "line_start": 529,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_resolve_from_none",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_call_with_text",
          "type": "function_definition",
          "line_start": 537,
          "line_end": 540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_call_with_lazy",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_call_with_none",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_call_with_invalid_value",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_call_with_bytes",
          "type": "function_definition",
          "line_start": 556,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_caches",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 573,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 578,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_caches_on_additional_parameters",
          "type": "function_definition",
          "line_start": 585,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 591,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 596,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4421,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_skips_cache_in_preview",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 616,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 621,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_request",
          "type": "function_definition",
          "line_start": 628,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 633,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 636,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_usage",
          "type": "function_definition",
          "line_start": 641,
          "line_end": 648,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 654,
          "line_end": 658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_caches",
          "type": "function_definition",
          "line_start": 660,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 666,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 673,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3932,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_caches_additional_parameters",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 722,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 693,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 700,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3184,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_doesnt_pollute_cache",
          "type": "function_definition",
          "line_start": 724,
          "line_end": 736,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 733,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3932,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_skips_cache_in_preview",
          "type": "function_definition",
          "line_start": 738,
          "line_end": 764,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 746,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 753,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "test_no_request",
          "type": "function_definition",
          "line_start": 766,
          "line_end": 785,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 771,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 776,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_page",
          "type": "function_definition",
          "line_start": 787,
          "line_end": 797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_cache_key",
          "type": "function_definition",
          "line_start": 799,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_invalid_usage",
          "type": "function_definition",
          "line_start": 807,
          "line_end": 814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_empty_value",
          "type": "function_definition",
          "line_start": 822,
          "line_end": 825,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_compiled_regex",
          "type": "function_definition",
          "line_start": 827,
          "line_end": 828,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 828,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_string",
          "type": "function_definition",
          "line_start": 830,
          "line_end": 831,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1239,
          "ai_signals": []
        },
        {
          "name": "test_regex_with_flags",
          "type": "function_definition",
          "line_start": 833,
          "line_end": 839,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 835,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 838,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_base_js_flags",
          "type": "function_definition",
          "line_start": 841,
          "line_end": 847,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 844,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_regex_with_inline_flags",
          "type": "function_definition",
          "line_start": 849,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 852,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4739,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_regex_with_invalid_flag_locale",
          "type": "function_definition",
          "line_start": 855,
          "line_end": 874,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 861,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2989,
          "ai_signals": []
        },
        {
          "name": "test_regex_with_invalid_flag_verbose",
          "type": "function_definition",
          "line_start": 876,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 891,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2446,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 70,
        "avg_function_length": 11.11,
        "function_length_stddev": 9.17,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 140,
        "code_lines": 765,
        "comment_ratio": 0.1547,
        "comment_what_ratio": 0.4444,
        "naming_avg_length": 7.46,
        "debug_artifacts": [],
        "ai_smell_count": 53,
        "ai_smell_density": 0.069281,
        "structural_uniformity": 0.1753,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.58,
        "mechanical": 81.58,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0003_add_verbose_names.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 82,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.38,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0011_userprofile_dismissibles.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 108,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.08,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\test_utils.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 821,
      "functions": [
        {
          "name": "test_gravatar_default",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ]
        },
        {
          "name": "test_gravatar_custom_size",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ]
        },
        {
          "name": "test_gravatar_params_that_overlap",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar?d=robohash&s=200\"\n    )"
          ]
        },
        {
          "name": "test_gravatar_params_that_dont_overlap",
          "type": "decorated_definition",
          "line_start": 34,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar?f=y\")"
          ]
        },
        {
          "name": "test_gravatar_query_params_override_default_params",
          "type": "decorated_definition",
          "line_start": 42,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar?d=robohash&f=y\"\n    )"
          ]
        },
        {
          "name": "test_gravatar_trailing_slash",
          "type": "decorated_definition",
          "line_start": 54,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar/\")"
          ]
        },
        {
          "name": "test_gravatar_no_trailing_slash",
          "type": "decorated_definition",
          "line_start": 62,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar\")"
          ]
        },
        {
          "name": "test_gravatar_trailing_question_mark",
          "type": "decorated_definition",
          "line_start": 70,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1417,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.71)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org/avatar?\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 7.88,
        "function_length_stddev": 2.3,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 66,
        "comment_ratio": 0.1429,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.48,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7085,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\bulk_actions\\user_bulk_action.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 345,
      "functions": [
        {
          "name": "get_all_objects_in_listing_query",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 18,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 18,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 30,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 17,
        "function_length_stddev": 0.0,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 35,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.62,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.114286,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.4,
        "mechanical": 59.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\deprecation.py",
      "language": "python",
      "line_count": 88,
      "token_estimate": 741,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__getattr__",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 49,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 58,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 46,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function __getattr__ is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 23,
        "function_length_stddev": 26.87,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 59,
        "comment_ratio": 0.3295,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.050847,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.39,
        "mechanical": 76.39,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\timestamps.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 375,
      "functions": [
        {
          "name": "ensure_utc",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 13,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3322,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "parse_datetime_localized",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1134,
          "ai_signals": []
        },
        {
          "name": "render_timestamp",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1134,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 10.67,
        "function_length_stddev": 4.62,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 31,
        "comment_ratio": 0.2955,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.032258,
        "structural_uniformity": 0.567,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.4,
        "mechanical": 84.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\workflows.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 216,
      "functions": [
        {
          "name": "get_concrete_descendants",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 9,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4536,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_task_types",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1036,
          "ai_signals": []
        },
        {
          "name": "publish_workflow_state",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1036,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 6.67,
        "function_length_stddev": 3.21,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 25,
        "comment_ratio": 0.1071,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.21,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.04,
        "structural_uniformity": 0.5178,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.67,
        "mechanical": 83.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\copy_for_translation.py",
      "language": "python",
      "line_count": 254,
      "token_estimate": 2101,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        },
        {
          "name": "walk",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2693,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "_copy_for_translation",
          "type": "decorated_definition",
          "line_start": 101,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 101,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function _copy_for_translation is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1434,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        },
        {
          "name": "_copy_for_translation",
          "type": "decorated_definition",
          "line_start": 216,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 234,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2373,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0851,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 20.56,
        "function_length_stddev": 15.55,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 44,
        "code_lines": 210,
        "comment_ratio": 0.1732,
        "comment_what_ratio": 0.1818,
        "naming_avg_length": 8.17,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.014286,
        "structural_uniformity": 0.2436,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.82,
        "mechanical": 90.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\unpublish.py",
      "language": "python",
      "line_count": 92,
      "token_estimate": 661,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0086,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0086,
          "ai_signals": []
        },
        {
          "name": "_commit_unpublish",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0086,
          "ai_signals": []
        },
        {
          "name": "_after_unpublish",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0086,
          "ai_signals": []
        },
        {
          "name": "_unpublish_object",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 50,
              "description": "Function is 31 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 31 lines (> 30 dynamic threshold)",
                "impact": "Function _unpublish_object is 31 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1215,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0086,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 11.17,
        "function_length_stddev": 10.68,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 84,
        "comment_ratio": 0.087,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.44,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.011905,
        "structural_uniformity": 0.0431,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.09,
        "mechanical": 93.09,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\base.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 33,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 6,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 3,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\revert_to_page_revision.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 367,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1177,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 36,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 38,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4677,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9,
        "function_length_stddev": 4.24,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 43,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.72,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.046512,
        "structural_uniformity": 0.5286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.87,
        "mechanical": 86.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\blocks.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 40,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.31,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\choosers.py",
      "language": "python",
      "line_count": 153,
      "token_estimate": 1266,
      "functions": [
        {
          "name": "is_absolute_path",
          "type": "decorated_definition",
          "line_start": 14,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 85,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 95,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 95,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4015,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3208,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0515,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 7.6,
        "function_length_stddev": 5.64,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 142,
        "comment_ratio": 0.0719,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.028169,
        "structural_uniformity": 0.2577,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.56,
        "mechanical": 88.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\view_restrictions.py",
      "language": "python",
      "line_count": 45,
      "token_estimate": 368,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1343,
          "ai_signals": []
        },
        {
          "name": "clean_password",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1343,
          "ai_signals": []
        },
        {
          "name": "clean_groups",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1343,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 7.67,
        "function_length_stddev": 2.52,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 45,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6717,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.33,
        "mechanical": 96.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0001_create_admin_access_permissions.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 436,
      "functions": [
        {
          "name": "create_admin_access_permissions",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 22,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 23,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5567,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_admin_access_permissions",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 28,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 28,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 29,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 29,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5567,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 16.5,
        "function_length_stddev": 4.95,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 47,
        "comment_ratio": 0.1296,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 9.06,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.297872,
        "structural_uniformity": 0.7,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.3,
        "mechanical": 70.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\models.py",
      "language": "python",
      "line_count": 220,
      "token_estimate": 1858,
      "functions": [
        {
          "name": "get_object_usage",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 41,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 30,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function get_object_usage is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3727,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "popular_tags_for_model",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 67,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 67,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 69,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 69,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4227,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "stale",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": []
        },
        {
          "name": "available",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": []
        },
        {
          "name": "cleanup",
          "type": "decorated_definition",
          "line_start": 113,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "is_idle",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_available",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 143,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4227,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "for_preview",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": []
        },
        {
          "name": "stale",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0727,
          "ai_signals": []
        },
        {
          "name": "update_or_create_by_instance",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 166,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3227,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 15,
              "description": "Unused import: from wagtail.admin import panels",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'panels' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin import panels",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 8.73,
        "function_length_stddev": 9.29,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 187,
        "comment_ratio": 0.15,
        "comment_what_ratio": 0.3636,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.048128,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.13,
        "mechanical": 86.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\help_panel.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 236,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1019,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1019,
          "ai_signals": []
        },
        {
          "name": "clean_name",
          "type": "decorated_definition",
          "line_start": 30,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1019,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1019,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6,
        "function_length_stddev": 2.94,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 34,
        "comment_ratio": 0.1282,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5093,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\title_field_panel.py",
      "language": "python",
      "line_count": 133,
      "token_estimate": 1207,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "get_editable_context_data",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "get_attrs",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "get_placeholder",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "get_should_apply",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0617,
          "ai_signals": []
        },
        {
          "name": "get_target_selector",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4117,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 13.43,
        "function_length_stddev": 9.29,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 105,
        "comment_ratio": 0.2105,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.35,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.009524,
        "structural_uniformity": 0.3083,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.59,
        "mechanical": 91.59,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\bootstrap-transition.js",
      "language": "javascript",
      "line_count": 65,
      "token_estimate": 521,
      "functions": [
        {
          "name": "transitionEnd",
          "type": "function_declaration",
          "line_start": 20,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 21,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 21 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 23,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 23 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "callback",
          "type": "function_expression",
          "line_start": 44,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9.5,
        "function_length_stddev": 12.02,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 55,
        "comment_ratio": 0.1538,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.66,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.036364,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.66,
        "mechanical": 82.66,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\tag-it.js",
      "language": "javascript",
      "line_count": 545,
      "token_estimate": 5486,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 109,
        "code_lines": 436,
        "comment_ratio": 0.2,
        "comment_what_ratio": 0.1566,
        "naming_avg_length": 6.7,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\panels\\tabbed_interface.stories.tsx",
      "language": "tsx",
      "line_count": 135,
      "token_estimate": 741,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 15,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 17,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.416,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "buildTabs",
          "type": "arrow_function",
          "line_start": 27,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.066,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9.5,
        "function_length_stddev": 6.36,
        "import_count": 5,
        "export_count": 4,
        "comment_lines": 0,
        "code_lines": 135,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.56,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.007407,
        "structural_uniformity": 0.3301,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.15,
        "mechanical": 98.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\status_tag.stories.tsx",
      "language": "tsx",
      "line_count": 38,
      "token_estimate": 202,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 28,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 28,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 38,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.38,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.026316,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.42,
        "mechanical": 93.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\api\\test_images.py",
      "language": "python",
      "line_count": 270,
      "token_estimate": 2326,
      "functions": [
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1232,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "get_image_id_list",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1232,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 34,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 34,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 34,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 34,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 44,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 44,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 52,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 61,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 27,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 73,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 73,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 73,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 73,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 87,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 87,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 87,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 87,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 89,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 101,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 101,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 101,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 101,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 103,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 110,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 110,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 110,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 112,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 123,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 123,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 123,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 123,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 125,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 133,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 133,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 133,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 133,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 135,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_all_fields",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 142,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 142,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 142,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 142,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 144,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_all_fields_then_remove_something",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 156,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 156,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 156,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 156,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 158,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_fields_tags",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 168,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 168,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 168,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 168,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 170,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1232,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "get_image_id_list",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1232,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1232,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 207,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 207,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 207,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 207,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 219,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 200,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        },
        {
          "name": "test_thumbnail",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 250,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 250,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 256,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 256,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 256,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 256,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4732,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.61)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 12.82,
        "function_length_stddev": 12.73,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 247,
        "comment_ratio": 0.0852,
        "comment_what_ratio": 0.6087,
        "naming_avg_length": 6.58,
        "debug_artifacts": [],
        "ai_smell_count": 66,
        "ai_smell_density": 0.267206,
        "structural_uniformity": 0.0074,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.92,
        "mechanical": 70.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_copy_page.py",
      "language": "python",
      "line_count": 922,
      "token_estimate": 8502,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 18,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.335,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4616,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_bad_permissions",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 79,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 105,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 119,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 74,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_bad_permissions is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5345,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 123,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_post is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.335,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_with_exclude_fields_in_copy",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_copy_subpages",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 192,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_post_copy_subpages is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3102,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_copy_subpages_publish_copies",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 245,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_post_copy_subpages_publish_copies is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3102,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_new_parent",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_existing_slug_within_same_parent_page",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 347,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3887,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_and_subpages_to_same_tree_branch",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 370,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_existing_slug_to_another_parent_page",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_invalid_slug",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 413,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_post_valid_unicode_slug",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_no_publish_permission",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 459,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (0.53)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_no_publish_permission_post_copy_subpages_publish_copies",
          "type": "function_definition",
          "line_start": 464,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 464,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_no_publish_permission_post_copy_subpages_publish_copies is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3022,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_before_copy_page_hook",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 537,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4929,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_before_copy_page_hook_post",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 560,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3829,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_after_copy_page_hook",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 587,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3775,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_alias_post",
          "type": "function_definition",
          "line_start": 592,
          "line_end": 630,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 592,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_alias_post is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3326,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_alias_post_copy_subpages",
          "type": "function_definition",
          "line_start": 632,
          "line_end": 688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 632,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_alias_post_copy_subpages is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3043,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_alias_post_without_source_publish_permission",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 727,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 707,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 690,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_alias_post_without_source_publish_permission is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (0.53)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_copy_page_with_unique_uuids_in_orderables",
          "type": "function_definition",
          "line_start": 729,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 773,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 729,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_with_unique_uuids_in_orderables is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3749,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_with_custom_copy_form",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 800,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_copy_page_success_msg_contains_edit_button",
          "type": "function_definition",
          "line_start": 802,
          "line_end": 836,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 829,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3429,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_copy_page_success_msg_contains_edit_button_subpages",
          "type": "function_definition",
          "line_start": 838,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 863,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3489,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_page_copy_form_widgets",
          "type": "function_definition",
          "line_start": 872,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 889,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 872,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_copy_form_widgets is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3829,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 26,
        "avg_function_length": 33.81,
        "function_length_stddev": 13.85,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 125,
        "code_lines": 797,
        "comment_ratio": 0.1356,
        "comment_what_ratio": 0.6239,
        "naming_avg_length": 7.15,
        "debug_artifacts": [],
        "ai_smell_count": 27,
        "ai_smell_density": 0.033877,
        "structural_uniformity": 0.5904,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.04,
        "mechanical": 84.04,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_page_search.py",
      "language": "python",
      "line_count": 357,
      "token_estimate": 3471,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 26,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0936,
          "ai_signals": []
        },
        {
          "name": "test_view",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 35,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 41,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 41,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 58,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 59,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_searchable_fields",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0936,
          "ai_signals": []
        },
        {
          "name": "test_ajax",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 108,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 109,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 122,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_root_can_appear_in_search_results",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 128,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_uses_admin_display_title_from_specific_class",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0936,
          "ai_signals": []
        },
        {
          "name": "test_search_no_perms",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_order_by_title",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 180,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 180,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 184,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 184,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_order_by_updated",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 210,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 210,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 214,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 214,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_order_by_status",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 242,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 242,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 246,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 246,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_filter_content_type",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0936,
          "ai_signals": []
        },
        {
          "name": "test_empty_search_renders_content_type_facets",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 268,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 272,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 273,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 290,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 293,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 258,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_empty_search_renders_content_type_facets is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_search_with_content_type_filter",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 321,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 325,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 326,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 299,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_empty_search_with_content_type_filter is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4118,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_bulk_action_rendered",
          "type": "function_definition",
          "line_start": 344,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 348,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 349,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 355,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4436,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 18.88,
        "function_length_stddev": 12.87,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 20,
        "code_lines": 337,
        "comment_ratio": 0.056,
        "comment_what_ratio": 0.15,
        "naming_avg_length": 7.5,
        "debug_artifacts": [],
        "ai_smell_count": 38,
        "ai_smell_density": 0.11276,
        "structural_uniformity": 0.3182,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.87,
        "mechanical": 69.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_workflow_history.py",
      "language": "python",
      "line_count": 385,
      "token_estimate": 3374,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 21,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1277,
          "ai_signals": []
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 92,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 96,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 100,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 108,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 109,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 112,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 65,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_index is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3963,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index_with_bad_permissions",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 119,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_get_detail",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 125,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 229,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 233,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 237,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 241,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 248,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 252,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 253,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 256,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 132,
              "description": "Function is 125 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 125 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_detail is 125 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3263,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_get_detail_completed",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 108,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 300,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 258,
              "description": "Function is 108 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 108 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_detail_completed is 108 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_get_detail_with_bad_permissions",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 372,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2407,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 59.83,
        "function_length_stddev": 45.99,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 372,
        "comment_ratio": 0.0338,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 23,
        "ai_smell_density": 0.061828,
        "structural_uniformity": 0.2314,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 67.68,
        "mechanical": 67.68,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_collections_views.py",
      "language": "python",
      "line_count": 885,
      "token_estimate": 8773,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 47,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 49,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 76,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 80,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 80,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 91,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 91,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_ordering",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 111,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_no_permissions",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 128,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_with_change_permission",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 143,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 143,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_with_add_permission",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 160,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 160,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_with_delete_permission",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 177,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 177,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_with_add_permission_on_root",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 195,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 195,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 218,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 221,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_no_permissions",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 258,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_with_add_permission",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_cannot_add_outside_their_hierarchy",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2946,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 328,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 347,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 348,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 350,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_edit_root_collection",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_admin_url_finder",
          "type": "function_definition",
          "line_start": 357,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get_nonexistent_collection",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_move_collection",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_move_parent_collection_to_descendant",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 376,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_rename_collection",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_no_change_permission",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 426,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_no_change_permission_post",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 435,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_can_move_collection",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 443,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2504,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_cannot_move_collection_if_no_add_permission",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 469,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_marketing_user_cannot_move_collection_if_no_add_permission_post",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_move_parent_collection_to_descendant",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_cannot_move_collection_permissions_are_assigned_to",
          "type": "function_definition",
          "line_start": 498,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 507,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3438,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_cannot_move_collection_permissions_are_assigned_to_with_minimal_permission",
          "type": "function_definition",
          "line_start": 514,
          "line_end": 520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_marketing_user_cannot_move_collection_permissions_are_assigned_to_post",
          "type": "function_definition",
          "line_start": 522,
          "line_end": 552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_move_collection_permissions_are_assigned_to_with_minimal_permission_post",
          "type": "function_definition",
          "line_start": 554,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_page_shows_delete_link_only_if_delete_permitted",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 596,
          "line_end": 599,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 601,
          "line_end": 608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 610,
          "line_end": 617,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 619,
          "line_end": 623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 622,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 623,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_delete_root_collection",
          "type": "function_definition",
          "line_start": 625,
          "line_end": 627,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get_nonexistent_collection",
          "type": "function_definition",
          "line_start": 629,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get_nonempty_collection",
          "type": "function_definition",
          "line_start": 633,
          "line_end": 640,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 639,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_collection_with_descendent",
          "type": "function_definition",
          "line_start": 642,
          "line_end": 649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 648,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 651,
          "line_end": 665,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 659,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3438,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_post_nonempty_collection",
          "type": "function_definition",
          "line_start": 667,
          "line_end": 674,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_post_collection_with_descendant",
          "type": "function_definition",
          "line_start": 676,
          "line_end": 683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_post_root_collection",
          "type": "function_definition",
          "line_start": 685,
          "line_end": 692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 696,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 709,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 711,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 716,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 719,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_delete_someone_elses_collection",
          "type": "function_definition",
          "line_start": 730,
          "line_end": 732,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_delete_someone_elses_collection_post",
          "type": "function_definition",
          "line_start": 734,
          "line_end": 738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_delete_their_own_root_collection",
          "type": "function_definition",
          "line_start": 740,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_delete_their_own_root_collection_post",
          "type": "function_definition",
          "line_start": 744,
          "line_end": 748,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_cannot_delete_collection_with_descendants",
          "type": "function_definition",
          "line_start": 750,
          "line_end": 759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 758,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_delete_collection_with_descendants_post",
          "type": "function_definition",
          "line_start": 761,
          "line_end": 770,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 774,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 782,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_privacy_for_collection",
          "type": "function_definition",
          "line_start": 784,
          "line_end": 794,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 789,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 790,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 792,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_private_child",
          "type": "function_definition",
          "line_start": 796,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 806,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 814,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 814,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 814,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 814,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 814,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4604,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 828,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_admin_displays_private_tag_for_private_base_collections",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 856,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_admin_displays_private_tag_for_private_sub_collections",
          "type": "function_definition",
          "line_start": 858,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_admin_displays_public_tag_for_public_base_collections",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 874,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        },
        {
          "name": "test_admin_displays_public_tag_for_public_sub_collections",
          "type": "function_definition",
          "line_start": 876,
          "line_end": 884,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1104,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 80,
        "avg_function_length": 9.53,
        "function_length_stddev": 7.27,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 60,
        "code_lines": 825,
        "comment_ratio": 0.0678,
        "comment_what_ratio": 0.3158,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 51,
        "ai_smell_density": 0.061818,
        "structural_uniformity": 0.2363,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.47,
        "mechanical": 84.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_filters.py",
      "language": "python",
      "line_count": 101,
      "token_estimate": 965,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1919,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.96)"
          ]
        },
        {
          "name": "test_with_relation",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1919,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.96)"
          ]
        },
        {
          "name": "test_with_callable",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1919,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.96)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 28.67,
        "function_length_stddev": 1.15,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 35,
        "code_lines": 66,
        "comment_ratio": 0.3465,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.9597,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.4,
        "mechanical": 94.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_navigation.py",
      "language": "python",
      "line_count": 95,
      "token_estimate": 971,
      "functions": [
        {
          "name": "test_admins_see_all_pages",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nav_root_for_nonadmin_is_closest_common_ancestor",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 51,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 51,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_sees_leaf_page_at_root_level",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 57,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 57,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_sees_pages_below_closest_common_ancestor",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 63,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 63,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_sees_only_explorable_pages",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 80,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 80,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonadmin_with_no_page_perms_cannot_explore",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 91,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 91,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.441,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 7.67,
        "function_length_stddev": 4.18,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 38,
        "code_lines": 57,
        "comment_ratio": 0.4,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.210526,
        "structural_uniformity": 0.4549,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.17,
        "mechanical": 73.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_telepath.py",
      "language": "python",
      "line_count": 354,
      "token_estimate": 2590,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "test_pack_object",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "test_pack_list",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "test_pack_dict",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "test_dict_reserved_words",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 83,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 83,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4542,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_recursive_arg_packing",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 124,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": []
        },
        {
          "name": "test_object_references",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 161,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2014,
          "ai_signals": []
        },
        {
          "name": "test_list_references",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 163,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_references is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1875,
          "ai_signals": []
        },
        {
          "name": "test_primitive_value_references",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 206,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_primitive_value_references is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1939,
          "ai_signals": []
        },
        {
          "name": "test_avoid_primitive_value_references_for_short_strings",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 286,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "animals_by_type",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1042,
          "ai_signals": []
        },
        {
          "name": "test_grouper_object_collisions",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 328,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 304,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_grouper_object_collisions is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2442,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 17.47,
        "function_length_stddev": 17.1,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 346,
        "comment_ratio": 0.0226,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 6.49,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.023121,
        "structural_uniformity": 0.021,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.66,
        "mechanical": 91.66,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_workflows.py",
      "language": "python",
      "line_count": 4890,
      "token_estimate": 47500,
      "functions": [
        {
          "name": "delete_existing_workflows",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 76,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_settings_and_reports_menus_are_shown_to_admin",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_settings_menus_are_not_shown_to_editor",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_menus_are_hidden_when_workflows_are_disabled",
          "type": "decorated_definition",
          "line_start": 93,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 113,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 121,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 122,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_workflows",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "crewai_no_output_file",
              "severity": "low",
              "line": 132,
              "description": "CrewAI task without output_file \u2014 results only in memory",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2675,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 154,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 155,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 166,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_snippets_assigned_to_workflow",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 173,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 176,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 176,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 181,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_deactivated",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 215,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 218,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 235,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4008,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 247,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 247,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 271,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 272,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 276,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 277,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 281,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 282,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 284,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 284,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_results",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 319,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 327,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 331,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 332,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 339,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 349,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 353,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 356,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 369,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 372,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 403,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 411,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 412,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 416,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 420,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 429,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 432,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 433,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 435,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 439,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 426,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 472,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_post is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1547,
          "ai_signals": []
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 543,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 543,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_already_has_workflow_check",
          "type": "function_definition",
          "line_start": 554,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 587,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 554,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_already_has_workflow_check is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2851,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_snippet_already_has_workflow_check",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 637,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 593,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_snippet_already_has_workflow_check is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1786,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 641,
          "line_end": 677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 654,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 668,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 676,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 677,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 679,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 687,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 689,
          "line_end": 737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 692,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 695,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 696,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 698,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 705,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 689,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 739,
          "line_end": 804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 739,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_post is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1539,
          "ai_signals": []
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 806,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 811,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 811,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_url_finder",
          "type": "function_definition",
          "line_start": 822,
          "line_end": 827,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_page_check",
          "type": "function_definition",
          "line_start": 829,
          "line_end": 863,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 859,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2008,
          "ai_signals": []
        },
        {
          "name": "test_snippet_already_has_workflow_check",
          "type": "function_definition",
          "line_start": 865,
          "line_end": 911,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 865,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_snippet_already_has_workflow_check is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1753,
          "ai_signals": []
        },
        {
          "name": "test_render_enable_button_if_workflow_disabled",
          "type": "function_definition",
          "line_start": 913,
          "line_end": 920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 917,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_enable_button_if_workflow_disabled_minimal_permissions",
          "type": "function_definition",
          "line_start": 922,
          "line_end": 939,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 927,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 936,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_enable_button_if_workflow_disabled_no_permissions",
          "type": "function_definition",
          "line_start": 941,
          "line_end": 957,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 946,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 954,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pages_and_content_types_ignored_if_workflow_disabled",
          "type": "function_definition",
          "line_start": 959,
          "line_end": 1001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 959,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_pages_and_content_types_ignored_if_workflow_disabled is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1822,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1007,
          "line_end": 1029,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1020,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1028,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1029,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1031,
          "line_end": 1037,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 1039,
          "line_end": 1045,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_no_permissions",
          "type": "function_definition",
          "line_start": 1047,
          "line_end": 1055,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_post_with_permission",
          "type": "function_definition",
          "line_start": 1057,
          "line_end": 1060,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1064,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1074,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1082,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1083,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1085,
          "line_end": 1086,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1088,
          "line_end": 1107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1091,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1093,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1094,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1105,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deactivated",
          "type": "function_definition",
          "line_start": 1109,
          "line_end": 1145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1118,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1121,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1140,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3846,
          "ai_signals": [
            "High anti-pattern density (0.81)"
          ]
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 1147,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1152,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1152,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 1163,
          "line_end": 1187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1176,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1177,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1181,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1182,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1186,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1187,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 1189,
          "line_end": 1198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1189,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1189,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_results",
          "type": "function_definition",
          "line_start": 1200,
          "line_end": 1213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1210,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_task_type_filter",
          "type": "function_definition",
          "line_start": 1215,
          "line_end": 1271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1220,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1220,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1221,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1221,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1230,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1256,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1215,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_task_type_filter is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_task_type_filter_hidden_if_single_task_type",
          "type": "function_definition",
          "line_start": 1273,
          "line_end": 1296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1278,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1278,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1292,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 1298,
          "line_end": 1319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "crewai_no_output_file",
              "severity": "low",
              "line": 1299,
              "description": "CrewAI task without output_file \u2014 results only in memory",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1313,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1317,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1318,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 1321,
          "line_end": 1348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "crewai_no_output_file",
              "severity": "low",
              "line": 1326,
              "description": "CrewAI task without output_file \u2014 results only in memory",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "crewai_no_output_file",
              "severity": "low",
              "line": 1340,
              "description": "CrewAI task without output_file \u2014 results only in memory",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1352,
          "line_end": 1371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1362,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1370,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1371,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1373,
          "line_end": 1379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1375,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1381,
          "line_end": 1391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1386,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.419,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 1393,
          "line_end": 1403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1396,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1399,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1400,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_non_task_model",
          "type": "function_definition",
          "line_start": 1405,
          "line_end": 1409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1405,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1405,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1407,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_base_task_model",
          "type": "function_definition",
          "line_start": 1411,
          "line_end": 1415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1411,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1411,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 1417,
          "line_end": 1425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 1427,
          "line_end": 1441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1432,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1432,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1445,
          "line_end": 1447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1449,
          "line_end": 1450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 1452,
          "line_end": 1462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1456,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.419,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_single_task_type",
          "type": "function_definition",
          "line_start": 1464,
          "line_end": 1481,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1477,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2953,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1485,
          "line_end": 1505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1496,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1504,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1505,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1507,
          "line_end": 1510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1512,
          "line_end": 1515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 1517,
          "line_end": 1527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1520,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1523,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1524,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1526,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 1529,
          "line_end": 1548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_permissions",
          "type": "function_definition",
          "line_start": 1550,
          "line_end": 1564,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1555,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1555,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_enable_button_if_task_disabled",
          "type": "function_definition",
          "line_start": 1566,
          "line_end": 1573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1570,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_enable_button_if_task_disabled_minimal_permissions",
          "type": "function_definition",
          "line_start": 1575,
          "line_end": 1592,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1580,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1589,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_enable_button_if_task_disabled_no_permissions",
          "type": "function_definition",
          "line_start": 1594,
          "line_end": 1610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1599,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1607,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_url_finder",
          "type": "function_definition",
          "line_start": 1612,
          "line_end": 1617,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1623,
          "line_end": 1649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1631,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1638,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3601,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 1651,
          "line_end": 1662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setup_object",
          "type": "function_definition",
          "line_start": 1664,
          "line_end": 1678,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 1680,
          "line_end": 1684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1686,
          "line_end": 1695,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "workflow_action",
          "type": "function_definition",
          "line_start": 1697,
          "line_end": 1710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "approve",
          "type": "function_definition",
          "line_start": 1712,
          "line_end": 1713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "reject",
          "type": "function_definition",
          "line_start": 1715,
          "line_end": 1716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1722,
          "line_end": 1741,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1725,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1729,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1733,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1736,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1741,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 1743,
          "line_end": 1745,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "setup_object",
          "type": "function_definition",
          "line_start": 1747,
          "line_end": 1759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1758,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1758,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 1761,
          "line_end": 1765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1767,
          "line_end": 1774,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1778,
          "line_end": 1781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_submit_for_approval_creates_states",
          "type": "function_definition",
          "line_start": 1783,
          "line_end": 1799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_submit_for_approval_changes_status_in_status_side_panel_meta",
          "type": "function_definition",
          "line_start": 1801,
          "line_end": 1818,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1814,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2953,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_submit_for_approval_changes_lock_status",
          "type": "function_definition",
          "line_start": 1820,
          "line_end": 1857,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1820,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_submit_for_approval_changes_lock_status is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "test_can_manual_lock_while_in_workflow",
          "type": "function_definition",
          "line_start": 1859,
          "line_end": 1883,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_can_unlock_manual_lock_while_in_workflow",
          "type": "function_definition",
          "line_start": 1885,
          "line_end": 1913,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_can_unlock_other_users_manual_lock_while_in_workflow",
          "type": "function_definition",
          "line_start": 1915,
          "line_end": 1947,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_cannot_unlock_other_users_manual_lock_while_in_workflow",
          "type": "function_definition",
          "line_start": 1949,
          "line_end": 1982,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_menu_items",
          "type": "function_definition",
          "line_start": 1984,
          "line_end": 2057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1984,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_menu_items is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1481,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_menu_items_when_reverting",
          "type": "function_definition",
          "line_start": 2059,
          "line_end": 2137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2059,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_menu_items_when_reverting is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1451,
          "ai_signals": []
        },
        {
          "name": "test_submit_sends_mail",
          "type": "decorated_definition",
          "line_start": 2139,
          "line_end": 2167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2154,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2215,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_BASE_URL=\"http://admin.example.com\")"
          ]
        },
        {
          "name": "test_submit_sends_html_mail",
          "type": "decorated_definition",
          "line_start": 2169,
          "line_end": 2171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_USE_HTML=True)"
          ]
        },
        {
          "name": "test_submit_sends_mail_without_base_url",
          "type": "decorated_definition",
          "line_start": 2173,
          "line_end": 2203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2191,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2137,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_BASE_URL=None)"
          ]
        },
        {
          "name": "test_submit_sends_html_mail_without_base_url",
          "type": "decorated_definition",
          "line_start": 2205,
          "line_end": 2207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_USE_HTML=True)"
          ]
        },
        {
          "name": "test_email_send_error",
          "type": "decorated_definition",
          "line_start": 2209,
          "line_end": 2220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "mock.patch.object(\n        EmailMultiAlternatives, \"send\", side_effect=IOError(\"Server down\")\n    )"
          ]
        },
        {
          "name": "test_resume_rejected_workflow",
          "type": "function_definition",
          "line_start": 2222,
          "line_end": 2240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_restart_rejected_workflow",
          "type": "function_definition",
          "line_start": 2242,
          "line_end": 2264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_cancel_workflow",
          "type": "function_definition",
          "line_start": 2266,
          "line_end": 2296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_email_headers",
          "type": "function_definition",
          "line_start": 2298,
          "line_end": 2310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_html_email_headers",
          "type": "decorated_definition",
          "line_start": 2312,
          "line_end": 2324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_USE_HTML=True)"
          ]
        },
        {
          "name": "test_workflow_action_menu_items",
          "type": "function_definition",
          "line_start": 2335,
          "line_end": 2396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2335,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_menu_items is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1573,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_menu_items_when_reverting",
          "type": "function_definition",
          "line_start": 2398,
          "line_end": 2463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2398,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_menu_items_when_reverting is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1539,
          "ai_signals": []
        },
        {
          "name": "test_submit_for_approval_changes_lock_status",
          "type": "function_definition",
          "line_start": 2465,
          "line_end": 2489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_can_manual_lock_while_in_workflow",
          "type": "decorated_definition",
          "line_start": 2491,
          "line_end": 2493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "skip(\"Model is not lockable\")"
          ]
        },
        {
          "name": "test_can_unlock_manual_lock_while_in_workflow",
          "type": "decorated_definition",
          "line_start": 2495,
          "line_end": 2497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "skip(\"Model is not lockable\")"
          ]
        },
        {
          "name": "test_can_unlock_other_users_manual_lock_while_in_workflow",
          "type": "decorated_definition",
          "line_start": 2499,
          "line_end": 2501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "skip(\"Model is not lockable\")"
          ]
        },
        {
          "name": "test_cannot_unlock_other_users_manual_lock_while_in_workflow",
          "type": "decorated_definition",
          "line_start": 2503,
          "line_end": 2505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "skip(\"Model is not lockable\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2513,
          "line_end": 2519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 2521,
          "line_end": 2527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_approve_task_and_workflow",
          "type": "decorated_definition",
          "line_start": 2529,
          "line_end": 2582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2529,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_approve_task_and_workflow is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1657,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_FINISH_WORKFLOW_ACTION=\"\")"
          ]
        },
        {
          "name": "test_approve_task_and_workflow_with_ajax",
          "type": "function_definition",
          "line_start": 2584,
          "line_end": 2624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2593,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2584,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_approve_task_and_workflow_with_ajax is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2716,
          "ai_signals": []
        },
        {
          "name": "test_workflow_dashboard_panel",
          "type": "function_definition",
          "line_start": 2626,
          "line_end": 2638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2629,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2631,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_action_script_included",
          "type": "function_definition",
          "line_start": 2640,
          "line_end": 2657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2643,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2646,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_action_script_included_without_cancel_confirmation",
          "type": "decorated_definition",
          "line_start": 2659,
          "line_end": 2675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2663,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2665,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=False)"
          ]
        },
        {
          "name": "test_workflow_action_get",
          "type": "function_definition",
          "line_start": 2677,
          "line_end": 2710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2694,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2696,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2696,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2696,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2696,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_action_get_custom_template",
          "type": "function_definition",
          "line_start": 2712,
          "line_end": 2766,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2744,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2746,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2748,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2748,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2748,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2748,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2748,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2712,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_get_custom_template is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_action_view_bad_id",
          "type": "function_definition",
          "line_start": 2768,
          "line_end": 2785,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_view_not_in_group",
          "type": "function_definition",
          "line_start": 2787,
          "line_end": 2798,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_view_not_in_moderation",
          "type": "function_definition",
          "line_start": 2800,
          "line_end": 2838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2800,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_view_not_in_moderation is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1906,
          "ai_signals": []
        },
        {
          "name": "test_edit_view_workflow_cancellation_not_in_group",
          "type": "function_definition",
          "line_start": 2840,
          "line_end": 2860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_reject_task_and_workflow",
          "type": "function_definition",
          "line_start": 2862,
          "line_end": 2885,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_reject_task_and_workflow_without_form",
          "type": "function_definition",
          "line_start": 2887,
          "line_end": 2914,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_reject_task_and_workflow_with_invalid_form_ajax",
          "type": "function_definition",
          "line_start": 2916,
          "line_end": 2946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2927,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2137,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_view_rejection_not_in_group",
          "type": "function_definition",
          "line_start": 2948,
          "line_end": 2960,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_collect_workflow_action_data_get",
          "type": "function_definition",
          "line_start": 2962,
          "line_end": 2996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2979,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2981,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2982,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2982,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2982,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2982,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2982,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_collect_workflow_action_data_get_custom_template",
          "type": "function_definition",
          "line_start": 2998,
          "line_end": 3052,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3030,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3032,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3034,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3034,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3034,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3034,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3034,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2998,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_collect_workflow_action_data_get_custom_template is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_collect_workflow_action_data_post",
          "type": "function_definition",
          "line_start": 3054,
          "line_end": 3074,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3070,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3070,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3070,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3070,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_collect_workflow_action_data_post_invalid_form",
          "type": "function_definition",
          "line_start": 3076,
          "line_end": 3093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_collect_workflow_action_data_post_invalid_form_ajax",
          "type": "function_definition",
          "line_start": 3095,
          "line_end": 3116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3115,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2599,
          "ai_signals": []
        },
        {
          "name": "test_workflow_action_via_edit_view",
          "type": "function_definition",
          "line_start": 3118,
          "line_end": 3155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3118,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_action_via_edit_view is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1929,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3179,
          "line_end": 3185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "assertBreadcrumbs",
          "type": "function_definition",
          "line_start": 3187,
          "line_end": 3188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "assertPageTitle",
          "type": "function_definition",
          "line_start": 3190,
          "line_end": 3191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 3193,
          "line_end": 3194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 3196,
          "line_end": 3202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get_file_content",
          "type": "function_definition",
          "line_start": 3204,
          "line_end": 3213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_report",
          "type": "function_definition",
          "line_start": 3215,
          "line_end": 3257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3223,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3226,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3243,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3244,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3246,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3215,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_report is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_report_filtered",
          "type": "function_definition",
          "line_start": 3259,
          "line_end": 3348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 90,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3270,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3307,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3259,
              "description": "Function is 90 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 90 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_report_filtered is 90 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2175,
          "ai_signals": []
        },
        {
          "name": "test_workflow_report_export",
          "type": "function_definition",
          "line_start": 3350,
          "line_end": 3370,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3351,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2675,
          "ai_signals": []
        },
        {
          "name": "test_workflow_report_filtered_export",
          "type": "function_definition",
          "line_start": 3372,
          "line_end": 3414,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3373,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3372,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_workflow_report_filtered_export is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2636,
          "ai_signals": []
        },
        {
          "name": "test_workflow_report_deleted",
          "type": "function_definition",
          "line_start": 3416,
          "line_end": 3428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "assertBreadcrumbs",
          "type": "function_definition",
          "line_start": 3446,
          "line_end": 3447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "assertPageTitle",
          "type": "function_definition",
          "line_start": 3449,
          "line_end": 3450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 3452,
          "line_end": 3455,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3485,
          "line_end": 3497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3493,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3701,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 3499,
          "line_end": 3505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_vanilla_profile",
          "type": "function_definition",
          "line_start": 3507,
          "line_end": 3512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_submitted_email_notifications_sent",
          "type": "decorated_definition",
          "line_start": 3514,
          "line_end": 3562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3514,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_submitted_email_notifications_sent is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1723,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS=True)"
          ]
        },
        {
          "name": "test_submitted_email_notifications_superuser_settings",
          "type": "decorated_definition",
          "line_start": 3564,
          "line_end": 3588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS=False)"
          ]
        },
        {
          "name": "test_submit_notification_active_users_only",
          "type": "decorated_definition",
          "line_start": 3590,
          "line_end": 3622,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS=True)"
          ]
        },
        {
          "name": "test_submit_notification_preferences_respected",
          "type": "decorated_definition",
          "line_start": 3624,
          "line_end": 3655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_INCLUDE_SUPERUSERS=True)"
          ]
        },
        {
          "name": "test_approved_notifications",
          "type": "function_definition",
          "line_start": 3657,
          "line_end": 3671,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_approved_notifications_preferences_respected",
          "type": "function_definition",
          "line_start": 3673,
          "line_end": 3690,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_rejected_notifications",
          "type": "function_definition",
          "line_start": 3692,
          "line_end": 3706,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_rejected_notification_preferences_respected",
          "type": "function_definition",
          "line_start": 3708,
          "line_end": 3725,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3736,
          "line_end": 3741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_disable_workflow",
          "type": "function_definition",
          "line_start": 3750,
          "line_end": 3779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get_disable_workflow_shows_warning",
          "type": "function_definition",
          "line_start": 3781,
          "line_end": 3797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3792,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3797,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_disable_workflow_no_warning",
          "type": "function_definition",
          "line_start": 3799,
          "line_end": 3813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3807,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3813,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_disable_task_view",
          "type": "function_definition",
          "line_start": 3815,
          "line_end": 3855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3826,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3829,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3836,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3846,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3853,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3815,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_disable_task_view is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_disable_task",
          "type": "function_definition",
          "line_start": 3857,
          "line_end": 3879,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_enable_workflow",
          "type": "function_definition",
          "line_start": 3881,
          "line_end": 3891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_enable_workflow_minimal_permissions",
          "type": "function_definition",
          "line_start": 3893,
          "line_end": 3912,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3898,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2758,
          "ai_signals": []
        },
        {
          "name": "test_enable_workflow_no_permissions",
          "type": "function_definition",
          "line_start": 3914,
          "line_end": 3932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3919,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2851,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_enable_task",
          "type": "function_definition",
          "line_start": 3934,
          "line_end": 3944,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_enable_task_minimal_permissions",
          "type": "function_definition",
          "line_start": 3946,
          "line_end": 3965,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3951,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2758,
          "ai_signals": []
        },
        {
          "name": "test_enable_task_no_permissions",
          "type": "function_definition",
          "line_start": 3967,
          "line_end": 3985,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3972,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2851,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3997,
          "line_end": 4001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "edit_object",
          "type": "function_definition",
          "line_start": 4003,
          "line_end": 4005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_preview_workflow",
          "type": "function_definition",
          "line_start": 4007,
          "line_end": 4016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4015,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_workflow_show_edit_link_in_userbar",
          "type": "function_definition",
          "line_start": 4018,
          "line_end": 4030,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_preview_workflow_by_submitter",
          "type": "function_definition",
          "line_start": 4032,
          "line_end": 4040,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_preview_workflow_bad_task_id",
          "type": "function_definition",
          "line_start": 4042,
          "line_end": 4055,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_preview_workflow_nonexistent_ids",
          "type": "function_definition",
          "line_start": 4057,
          "line_end": 4069,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "edit_object",
          "type": "function_definition",
          "line_start": 4076,
          "line_end": 4078,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_preview_workflow_show_edit_link_in_userbar",
          "type": "decorated_definition",
          "line_start": 4080,
          "line_end": 4083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "expectedFailure"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4087,
          "line_end": 4093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 4095,
          "line_end": 4120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4101,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4110,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4113,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4115,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 4118,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4118,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 4122,
          "line_end": 4141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 4122,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 4122,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4130,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4133,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4135,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4136,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 4139,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4139,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 4143,
          "line_end": 4157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4150,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4155,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4157,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_create_model_selected",
          "type": "function_definition",
          "line_start": 4159,
          "line_end": 4174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4169,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3196,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_get_with_non_task_create_model_selected",
          "type": "function_definition",
          "line_start": 4176,
          "line_end": 4182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get_with_base_task_create_model_selected",
          "type": "function_definition",
          "line_start": 4184,
          "line_end": 4191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get_with_single_task_model",
          "type": "decorated_definition",
          "line_start": 4193,
          "line_end": 4213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4194,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4194,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4203,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4208,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.admin.views.workflows.get_task_types\")"
          ]
        },
        {
          "name": "get_post_data",
          "type": "function_definition",
          "line_start": 4217,
          "line_end": 4221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_post_with_create_model_selected",
          "type": "function_definition",
          "line_start": 4223,
          "line_end": 4248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4237,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2355,
          "ai_signals": []
        },
        {
          "name": "test_post_with_single_task_model",
          "type": "decorated_definition",
          "line_start": 4250,
          "line_end": 4277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4251,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4251,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4266,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.admin.views.workflows.get_task_types\")"
          ]
        },
        {
          "name": "test_post_without_create_model_selected",
          "type": "function_definition",
          "line_start": 4279,
          "line_end": 4289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_post_with_non_task_create_model_selected",
          "type": "function_definition",
          "line_start": 4291,
          "line_end": 4303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_post_with_base_task_create_model_selected",
          "type": "function_definition",
          "line_start": 4305,
          "line_end": 4318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4322,
          "line_end": 4325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 4327,
          "line_end": 4346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4335,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2758,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4350,
          "line_end": 4366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 4368,
          "line_end": 4383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4374,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 4376,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4376,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_no_permission",
          "type": "function_definition",
          "line_start": 4385,
          "line_end": 4428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4389,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4392,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4420,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4385,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_with_no_permission is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.419,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_with_minimal_permissions",
          "type": "function_definition",
          "line_start": 4430,
          "line_end": 4455,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4434,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4437,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4440,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_search_and_filtered_results",
          "type": "function_definition",
          "line_start": 4457,
          "line_end": 4476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4467,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4467,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4473,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 4475,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4475,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4481,
          "line_end": 4483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 4485,
          "line_end": 4497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "workflow_action",
          "type": "function_definition",
          "line_start": 4499,
          "line_end": 4507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_status_modal",
          "type": "function_definition",
          "line_start": 4509,
          "line_end": 4532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4512,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4519,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3925,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_status_through_workflow_cycle",
          "type": "function_definition",
          "line_start": 4534,
          "line_end": 4568,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4546,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4552,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4563,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4008,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_status_after_cancel",
          "type": "function_definition",
          "line_start": 4570,
          "line_end": 4575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_status_after_restart",
          "type": "function_definition",
          "line_start": 4577,
          "line_end": 4590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4581,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4588,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_status_modal_task_comments",
          "type": "function_definition",
          "line_start": 4592,
          "line_end": 4602,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4597,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4602,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_edit_locked_message",
          "type": "function_definition",
          "line_start": 4604,
          "line_end": 4620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflow_edit_locked_message",
          "type": "function_definition",
          "line_start": 4630,
          "line_end": 4643,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4647,
          "line_end": 4654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_dashboard_for_submitter",
          "type": "function_definition",
          "line_start": 4656,
          "line_end": 4662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_dashboard_for_moderator",
          "type": "function_definition",
          "line_start": 4664,
          "line_end": 4675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_dashboard_for_moderator_with_previous_revisions",
          "type": "function_definition",
          "line_start": 4677,
          "line_end": 4716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4692,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4677,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_dashboard_for_moderator_with_previous_revisions is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2758,
          "ai_signals": []
        },
        {
          "name": "test_dashboard_after_deleting_object_in_moderation",
          "type": "function_definition",
          "line_start": 4718,
          "line_end": 4732,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4748,
          "line_end": 4751,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflowstate_email_notifier_get_recipient_users__without_triggering_user",
          "type": "function_definition",
          "line_start": 4753,
          "line_end": 4766,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflowstate_email_notifier_get_recipient_users__with_triggering_user",
          "type": "function_definition",
          "line_start": 4768,
          "line_end": 4782,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflowstate_email_notifier_get_recipient_users__without_requested_by",
          "type": "function_definition",
          "line_start": 4784,
          "line_end": 4801,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_workflowstate_email_notifier_get_recipient_users__with_same_requested_by_and_triggering_user",
          "type": "function_definition",
          "line_start": 4803,
          "line_end": 4820,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_base_workflowstate_email_notifier_get_valid_recipients",
          "type": "decorated_definition",
          "line_start": 4822,
          "line_end": 4858,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4839,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4849,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4855,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3846,
          "ai_signals": [
            "High anti-pattern density (0.81)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.admin.mail.BaseWorkflowStateEmailNotifier.get_recipient_users\")"
          ]
        },
        {
          "name": "setup_workflow_and_tasks",
          "type": "function_definition",
          "line_start": 4862,
          "line_end": 4867,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_custom_lock_class",
          "type": "function_definition",
          "line_start": 4869,
          "line_end": 4873,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": []
        },
        {
          "name": "test_typeerror_if_custom_lock_class_inherits_basic_locks",
          "type": "decorated_definition",
          "line_start": 4875,
          "line_end": 4882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1008,
          "ai_signals": [],
          "decorators": [
            "mock.patch.object(CustomLockTask, \"lock_class\", new_callable=mock.PropertyMock)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 236,
        "avg_function_length": 18.65,
        "function_length_stddev": 15.51,
        "import_count": 25,
        "export_count": 0,
        "comment_lines": 375,
        "code_lines": 4515,
        "comment_ratio": 0.0767,
        "comment_what_ratio": 0.3355,
        "naming_avg_length": 7.75,
        "debug_artifacts": [],
        "ai_smell_count": 296,
        "ai_smell_density": 0.065559,
        "structural_uniformity": 0.1687,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.58,
        "mechanical": 80.58,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\viewsets\\test_model_viewset.py",
      "language": "python",
      "line_count": 2175,
      "token_estimate": 21893,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_menu_items",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 37,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3154,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_menu_item_with_only_view_permission",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 65,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 69,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 69,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 72,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 79,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_cannot_reverse_mismatched_converter_value",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_404_on_mismatched_converter_value",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 111,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_default_url",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "get_custom_url",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_default_templates",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 133,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 148,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 151,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_template_lookups",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 161,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 164,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 166,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 169,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 171,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 174,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 177,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 180,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 182,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_wagtail_admin_template_mixin_variables_with_legacy_header",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 190,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 193,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_wagtail_admin_template_mixin_variables",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 215,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 218,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 234,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_list_display",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 248,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1862,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 284,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_unfiltered_no_results",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 297,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 297,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 311,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 312,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 313,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 314,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unfiltered_with_results",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 319,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 319,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 334,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 335,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 336,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 337,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_filter_with_results",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 342,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 342,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 353,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 354,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 355,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 356,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtered_no_results",
          "type": "function_definition",
          "line_start": 361,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 367,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 367,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 379,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 380,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 381,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 382,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtered_with_results",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 402,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 402,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 414,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 415,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 416,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 417,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 441,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 444,
          "line_end": 453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "assertInputRendered",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 456,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 461,
          "line_end": 462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_search_disabled",
          "type": "function_definition",
          "line_start": 464,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 466,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 470,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_no_results",
          "type": "function_definition",
          "line_start": 474,
          "line_end": 484,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 475,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_search_with_results",
          "type": "function_definition",
          "line_start": 486,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 487,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtered_searched_no_results",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 500,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2649,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_filtered_searched_with_results",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 524,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 517,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3154,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "assertInputRendered",
          "type": "function_definition",
          "line_start": 530,
          "line_end": 532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 531,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 536,
          "line_end": 543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 545,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 549,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_single_result_with_body",
          "type": "function_definition",
          "line_start": 551,
          "line_end": 556,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_multiple_results_with_title",
          "type": "function_definition",
          "line_start": 558,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_no_results",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 570,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 574,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 577,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_export_disabled",
          "type": "function_definition",
          "line_start": 592,
          "line_end": 600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 595,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_not_export_shows_export_buttons",
          "type": "function_definition",
          "line_start": 602,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 605,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_filtered_shows_export_buttons_with_filters",
          "type": "function_definition",
          "line_start": 614,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 617,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2795,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 630,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_csv_export_filtered",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 666,
          "line_end": 683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export_filtered",
          "type": "function_definition",
          "line_start": 685,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 708,
          "line_end": 709,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 711,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_default_list_pagination",
          "type": "function_definition",
          "line_start": 716,
          "line_end": 724,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_custom_list_pagination",
          "type": "function_definition",
          "line_start": 726,
          "line_end": 734,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 738,
          "line_end": 739,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 741,
          "line_end": 749,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_default_order",
          "type": "function_definition",
          "line_start": 751,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 756,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 756,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_order_from_query_args",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 769,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 769,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_order_from_view",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 783,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 783,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_order_from_from_viewset",
          "type": "function_definition",
          "line_start": 792,
          "line_end": 804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 797,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 797,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 808,
          "line_end": 809,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 811,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_index_view",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 820,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 823,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_view",
          "type": "function_definition",
          "line_start": 825,
          "line_end": 837,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 830,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 834,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 837,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_view",
          "type": "function_definition",
          "line_start": 839,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 845,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 849,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 852,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_view",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 860,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_history_view",
          "type": "function_definition",
          "line_start": 862,
          "line_end": 885,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 871,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 877,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 881,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 882,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 885,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_history_view_pagination",
          "type": "function_definition",
          "line_start": 887,
          "line_end": 897,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 888,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_usage_view",
          "type": "function_definition",
          "line_start": 899,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 908,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 914,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 918,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 919,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 922,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_view_pagination",
          "type": "function_definition",
          "line_start": 924,
          "line_end": 937,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 926,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2962,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_inspect_view",
          "type": "function_definition",
          "line_start": 939,
          "line_end": 962,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 948,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 954,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 958,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 959,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 962,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 966,
          "line_end": 996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 975,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 975,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 983,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 991,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 998,
          "line_end": 999,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1001,
          "line_end": 1028,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1007,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1013,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1022,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1028,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_action_filter",
          "type": "function_definition",
          "line_start": 1030,
          "line_end": 1073,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1035,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1049,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1057,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1073,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1030,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_action_filter is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_filter",
          "type": "function_definition",
          "line_start": 1075,
          "line_end": 1126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1114,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1118,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1126,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1075,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_filter is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3827,
          "ai_signals": [
            "High anti-pattern density (0.96)"
          ]
        },
        {
          "name": "test_filtered_no_results",
          "type": "function_definition",
          "line_start": 1128,
          "line_end": 1138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1130,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_empty",
          "type": "function_definition",
          "line_start": 1140,
          "line_end": 1162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1143,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1983,
          "ai_signals": []
        },
        {
          "name": "test_edit_view_links_to_history_view",
          "type": "function_definition",
          "line_start": 1164,
          "line_end": 1170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deleted_user",
          "type": "function_definition",
          "line_start": 1172,
          "line_end": 1183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1187,
          "line_end": 1198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1200,
          "line_end": 1201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1203,
          "line_end": 1237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1207,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1237,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2462,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_usage_without_permission",
          "type": "function_definition",
          "line_start": 1239,
          "line_end": 1249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1243,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1245,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_without_permission_on_referrer",
          "type": "function_definition",
          "line_start": 1251,
          "line_end": 1281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1255,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1258,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1260,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1265,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_with_describe_on_delete",
          "type": "function_definition",
          "line_start": 1283,
          "line_end": 1310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1287,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1712,
          "ai_signals": []
        },
        {
          "name": "test_empty",
          "type": "function_definition",
          "line_start": 1312,
          "line_end": 1321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1315,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_view_links_to_usage_view",
          "type": "function_definition",
          "line_start": 1323,
          "line_end": 1329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1326,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_view_links_to_usage_view",
          "type": "function_definition",
          "line_start": 1331,
          "line_end": 1336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1334,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1340,
          "line_end": 1341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1343,
          "line_end": 1352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1354,
          "line_end": 1372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1364,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_inspect_view_fields",
          "type": "function_definition",
          "line_start": 1374,
          "line_end": 1387,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1382,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1383,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_view_permission_registered",
          "type": "function_definition",
          "line_start": 1389,
          "line_end": 1406,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1390,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1390,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1392,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_disabled",
          "type": "function_definition",
          "line_start": 1408,
          "line_end": 1411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_without_permission",
          "type": "function_definition",
          "line_start": 1413,
          "line_end": 1423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1417,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1419,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assert_minimal_permission",
          "type": "function_definition",
          "line_start": 1425,
          "line_end": 1454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1429,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1432,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1447,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1448,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_only_add_permission",
          "type": "function_definition",
          "line_start": 1456,
          "line_end": 1457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_only_view_permission",
          "type": "function_definition",
          "line_start": 1459,
          "line_end": 1460,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1464,
          "line_end": 1465,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1467,
          "line_end": 1469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1471,
          "line_end": 1515,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1475,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1477,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1481,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1482,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1485,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1511,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1511,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1512,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1514,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1515,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1471,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_simple is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_title_cell_not_link_to_edit_view_when_no_edit_permission",
          "type": "function_definition",
          "line_start": 1517,
          "line_end": 1545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1521,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1525,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1528,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1532,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_title_cell_links_to_inspect_view_when_no_edit_permission",
          "type": "function_definition",
          "line_start": 1547,
          "line_end": 1585,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1551,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1555,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1558,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1562,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1547,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_title_cell_links_to_inspect_view_when_no_edit_permission is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_disabled",
          "type": "function_definition",
          "line_start": 1587,
          "line_end": 1625,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1591,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1593,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1599,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1621,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1621,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1622,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1624,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1625,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1587,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_disabled is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_dropdown_not_rendered_when_no_child_buttons_exist",
          "type": "function_definition",
          "line_start": 1627,
          "line_end": 1646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1631,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1635,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1638,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1644,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1650,
          "line_end": 1652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1654,
          "line_end": 1656,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_without_permission",
          "type": "function_definition",
          "line_start": 1658,
          "line_end": 1668,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1662,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1664,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_is_prefilled",
          "type": "function_definition",
          "line_start": 1670,
          "line_end": 1675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1673,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1679,
          "line_end": 1680,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1682,
          "line_end": 1685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_edit_form_rendered_with_panels",
          "type": "function_definition",
          "line_start": 1687,
          "line_end": 1709,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1690,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1694,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1706,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_field_permissions",
          "type": "function_definition",
          "line_start": 1711,
          "line_end": 1738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1716,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1719,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1726,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1737,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1742,
          "line_end": 1743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1745,
          "line_end": 1754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_create_error",
          "type": "function_definition",
          "line_start": 1756,
          "line_end": 1765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_create_success",
          "type": "function_definition",
          "line_start": 1767,
          "line_end": 1777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_edit_error",
          "type": "function_definition",
          "line_start": 1779,
          "line_end": 1787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_edit_success",
          "type": "function_definition",
          "line_start": 1789,
          "line_end": 1799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_delete_success",
          "type": "function_definition",
          "line_start": 1801,
          "line_end": 1807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1811,
          "line_end": 1812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1814,
          "line_end": 1828,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_header_buttons_in_edit_view",
          "type": "function_definition",
          "line_start": 1830,
          "line_end": 1852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1833,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1983,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1856,
          "line_end": 1860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_header_button_rendered",
          "type": "function_definition",
          "line_start": 1862,
          "line_end": 1880,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1867,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2304,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_show_ordering_column",
          "type": "function_definition",
          "line_start": 1882,
          "line_end": 1923,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1887,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1914,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1919,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1920,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1882,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_ordering_column is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reordering_disabled_with_explicit_sort_order_field_none",
          "type": "function_definition",
          "line_start": 1925,
          "line_end": 1946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1932,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2053,
          "ai_signals": []
        },
        {
          "name": "test_reordering_disabled_with_no_sort_order_field",
          "type": "function_definition",
          "line_start": 1948,
          "line_end": 1969,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1955,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2053,
          "ai_signals": []
        },
        {
          "name": "test_reordering_disabled_with_insufficient_permission",
          "type": "function_definition",
          "line_start": 1971,
          "line_end": 2001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1975,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1978,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1981,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1987,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_minimal_permission",
          "type": "function_definition",
          "line_start": 2003,
          "line_end": 2016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2007,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2010,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2013,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2020,
          "line_end": 2028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_create_sets_max_sort_order",
          "type": "function_definition",
          "line_start": 2030,
          "line_end": 2037,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_create_does_not_set_max_sort_order_without_sort_order_field",
          "type": "function_definition",
          "line_start": 2039,
          "line_end": 2046,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2050,
          "line_end": 2058,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 2060,
          "line_end": 2061,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "assertOrder",
          "type": "function_definition",
          "line_start": 2063,
          "line_end": 2070,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_reorder_view_disabled_without_sort_order_field",
          "type": "function_definition",
          "line_start": 2072,
          "line_end": 2081,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_get_request_does_not_alter_order",
          "type": "function_definition",
          "line_start": 2083,
          "line_end": 2088,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_post_request_without_position_argument_moves_to_the_end",
          "type": "function_definition",
          "line_start": 2090,
          "line_end": 2096,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_post_request_with_non_integer_position_moves_to_the_end",
          "type": "function_definition",
          "line_start": 2098,
          "line_end": 2104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_move_position_up",
          "type": "function_definition",
          "line_start": 2106,
          "line_end": 2113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_move_position_down",
          "type": "function_definition",
          "line_start": 2115,
          "line_end": 2122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_move_position_to_same_position",
          "type": "function_definition",
          "line_start": 2124,
          "line_end": 2130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_move_position_with_invalid_target_position",
          "type": "function_definition",
          "line_start": 2132,
          "line_end": 2138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_insufficient_permission",
          "type": "function_definition",
          "line_start": 2140,
          "line_end": 2155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2150,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_minimal_permission",
          "type": "function_definition",
          "line_start": 2157,
          "line_end": 2174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2161,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2164,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2167,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 147,
        "avg_function_length": 13.16,
        "function_length_stddev": 10.87,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 106,
        "code_lines": 2069,
        "comment_ratio": 0.0487,
        "comment_what_ratio": 0.0566,
        "naming_avg_length": 7.27,
        "debug_artifacts": [],
        "ai_smell_count": 211,
        "ai_smell_density": 0.101982,
        "structural_uniformity": 0.1742,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.79,
        "mechanical": 72.79,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\side_panels.py",
      "language": "python",
      "line_count": 377,
      "token_estimate": 3625,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 10,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_status_templates",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_scheduled_publishing_context",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 82,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 112,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 107,
              "description": "Function is 82 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 82 lines (> 30 dynamic threshold)",
                "impact": "Function get_scheduled_publishing_context is 82 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1139,
          "ai_signals": []
        },
        {
          "name": "get_lock_context",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_usage_context",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_status_templates",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_usage_context",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 268,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function get_context_data is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1183,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_axe_configuration",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 341,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "auto_update_interval",
          "type": "decorated_definition",
          "line_start": 367,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 371,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 13.67,
        "function_length_stddev": 18.0,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 349,
        "comment_ratio": 0.0743,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.011461,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.3,
        "mechanical": 91.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\pages.py",
      "language": "python",
      "line_count": 141,
      "token_estimate": 1175,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 141,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.81,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\bulk_action\\__init__.py",
      "language": "python",
      "line_count": 5,
      "token_estimate": 26,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 5,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\dismissibles.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 232,
      "functions": [
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1939,
          "ai_signals": []
        },
        {
          "name": "patch",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 19,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5121,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 8,
        "function_length_stddev": 4.24,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 25,
        "comment_ratio": 0.0741,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.43,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.04,
        "structural_uniformity": 0.4697,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.5,
        "mechanical": 88.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\models.py",
      "language": "python",
      "line_count": 1721,
      "token_estimate": 15065,
      "functions": [
        {
          "name": "is_searchable",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "filterset_class",
          "type": "decorated_definition",
          "line_start": 102,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "table_class",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_table_kwargs",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "_annotate_queryset_updated_at",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 141,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 146,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 146,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 146,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 150,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 155,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 163,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 163,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "order_queryset",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 184,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 184,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 184,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_title_column_class",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "_get_title_column",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 220,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2784,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "_get_custom_column",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 240,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 245,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 247,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 250,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 252,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 268,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 228,
              "description": "Function is 44 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 30 dynamic threshold)",
                "impact": "Function _get_custom_column is 44 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "list_display",
          "type": "decorated_definition",
          "line_start": 273,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 277,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 277,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 280,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 284,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_copy_url",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_inspect_url",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_reorder_url",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "add_url",
          "type": "decorated_definition",
          "line_start": 321,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_page_title",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 330,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 336,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3756,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "header_more_buttons",
          "type": "decorated_definition",
          "line_start": 343,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_list_more_buttons",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 356,
              "description": "Function is 39 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 30 dynamic threshold)",
                "impact": "Function get_list_more_buttons is 39 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1737,
          "ai_signals": []
        },
        {
          "name": "get_list_buttons",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 420,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 400,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.224,
          "ai_signals": []
        },
        {
          "name": "add_item_label",
          "type": "decorated_definition",
          "line_start": 422,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 423,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "verbose_name_plural",
          "type": "decorated_definition",
          "line_start": 430,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "show_ordering_column",
          "type": "decorated_definition",
          "line_start": 436,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_paginate_by",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_valid_orderings",
          "type": "function_definition",
          "line_start": 447,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 465,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 462,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 467,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 516,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 518,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_action",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 533,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_available_actions",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 539,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 541,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 564,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 554,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 560,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 566,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "add_url",
          "type": "decorated_definition",
          "line_start": 574,
          "line_end": 576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 578,
          "line_end": 584,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 592,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 594,
          "line_end": 603,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_buttons",
          "type": "function_definition",
          "line_start": 605,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_error_message",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 619,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "has_unsaved_changes",
          "type": "decorated_definition",
          "line_start": 621,
          "line_end": 623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 625,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 631,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 632,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 651,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 653,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_initial_form_instance",
          "type": "function_definition",
          "line_start": 662,
          "line_end": 666,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 664,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 664,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 691,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_json",
          "type": "function_definition",
          "line_start": 693,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "save_action",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 718,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 720,
          "line_end": 731,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 733,
          "line_end": 744,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 737,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3756,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 748,
          "line_end": 751,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_initial_form_instance",
          "type": "function_definition",
          "line_start": 753,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 791,
          "line_end": 793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 795,
          "line_end": 798,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 800,
          "line_end": 810,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 812,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "object_pk",
          "type": "decorated_definition",
          "line_start": 826,
          "line_end": 834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 832,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_action",
          "type": "function_definition",
          "line_start": 836,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 837,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_available_actions",
          "type": "function_definition",
          "line_start": 842,
          "line_end": 843,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 845,
          "line_end": 849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 851,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 862,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 865,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 884,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_last_updated_info",
          "type": "function_definition",
          "line_start": 886,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "can_delete",
          "type": "decorated_definition",
          "line_start": 893,
          "line_end": 895,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "header_more_buttons",
          "type": "decorated_definition",
          "line_start": 897,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 912,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1969,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 935,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_copy_url",
          "type": "function_definition",
          "line_start": 937,
          "line_end": 939,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 941,
          "line_end": 943,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_history_url",
          "type": "function_definition",
          "line_start": 945,
          "line_end": 947,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_inspect_url",
          "type": "function_definition",
          "line_start": 949,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 955,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 957,
          "line_end": 963,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 965,
          "line_end": 974,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 976,
          "line_end": 981,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 983,
          "line_end": 998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_json",
          "type": "function_definition",
          "line_start": 1000,
          "line_end": 1008,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "save_action",
          "type": "function_definition",
          "line_start": 1010,
          "line_end": 1022,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 1024,
          "line_end": 1033,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_buttons",
          "type": "function_definition",
          "line_start": 1035,
          "line_end": 1036,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_error_message",
          "type": "function_definition",
          "line_start": 1038,
          "line_end": 1049,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 1051,
          "line_end": 1062,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 1064,
          "line_end": 1075,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1068,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3756,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "has_unsaved_changes",
          "type": "decorated_definition",
          "line_start": 1077,
          "line_end": 1079,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "hydrate_create_view",
          "type": "decorated_definition",
          "line_start": 1081,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1085,
          "line_end": 1112,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1103,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1111,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 1134,
          "line_end": 1140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 1142,
          "line_end": 1155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1151,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_usage",
          "type": "function_definition",
          "line_start": 1157,
          "line_end": 1160,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 1162,
          "line_end": 1171,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 1173,
          "line_end": 1174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 1176,
          "line_end": 1177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 1179,
          "line_end": 1185,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 1187,
          "line_end": 1193,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "confirmation_message",
          "type": "decorated_definition",
          "line_start": 1195,
          "line_end": 1199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 1201,
          "line_end": 1210,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "delete_action",
          "type": "function_definition",
          "line_start": 1212,
          "line_end": 1215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 1217,
          "line_end": 1226,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1228,
          "line_end": 1236,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 1251,
          "line_end": 1255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 1257,
          "line_end": 1258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 1260,
          "line_end": 1261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 1263,
          "line_end": 1283,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1269,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1275,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1279,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1280,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_more_buttons",
          "type": "decorated_definition",
          "line_start": 1285,
          "line_end": 1296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_fields",
          "type": "function_definition",
          "line_start": 1298,
          "line_end": 1307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_field_label",
          "type": "function_definition",
          "line_start": 1309,
          "line_end": 1310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1310,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_field_display_value",
          "type": "function_definition",
          "line_start": 1312,
          "line_end": 1341,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_for_field",
          "type": "function_definition",
          "line_start": 1343,
          "line_end": 1355,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1349,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3532,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_fields_context",
          "type": "function_definition",
          "line_start": 1357,
          "line_end": 1358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 1360,
          "line_end": 1362,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 1364,
          "line_end": 1366,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1368,
          "line_end": 1372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 1386,
          "line_end": 1406,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1392,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1396,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1398,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1402,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1403,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 1408,
          "line_end": 1415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 1417,
          "line_end": 1422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 1424,
          "line_end": 1425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 1427,
          "line_end": 1430,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 1432,
          "line_end": 1433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 1435,
          "line_end": 1437,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_history_url",
          "type": "function_definition",
          "line_start": 1439,
          "line_end": 1441,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 1443,
          "line_end": 1445,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "_get_revision_and_heading",
          "type": "function_definition",
          "line_start": 1447,
          "line_end": 1469,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "_get_comparison",
          "type": "function_definition",
          "line_start": 1471,
          "line_end": 1484,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1479,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1486,
          "line_end": 1508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 1521,
          "line_end": 1524,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 1526,
          "line_end": 1528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 1530,
          "line_end": 1533,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_usage",
          "type": "function_definition",
          "line_start": 1535,
          "line_end": 1536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 1538,
          "line_end": 1539,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_objects_to_unpublish",
          "type": "function_definition",
          "line_start": 1541,
          "line_end": 1543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 1545,
          "line_end": 1546,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 1548,
          "line_end": 1551,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_buttons",
          "type": "function_definition",
          "line_start": 1553,
          "line_end": 1560,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_next_url",
          "type": "function_definition",
          "line_start": 1562,
          "line_end": 1568,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_unpublish_url",
          "type": "function_definition",
          "line_start": 1570,
          "line_end": 1576,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 1578,
          "line_end": 1581,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "unpublish",
          "type": "function_definition",
          "line_start": 1583,
          "line_end": 1594,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1588,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3756,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1596,
          "line_end": 1606,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1608,
          "line_end": 1618,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 1632,
          "line_end": 1637,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 1639,
          "line_end": 1642,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 1644,
          "line_end": 1645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_revision",
          "type": "function_definition",
          "line_start": 1647,
          "line_end": 1648,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_revisions_unschedule_url",
          "type": "function_definition",
          "line_start": 1650,
          "line_end": 1654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_object_display_title",
          "type": "function_definition",
          "line_start": 1656,
          "line_end": 1657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 1659,
          "line_end": 1665,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_success_buttons",
          "type": "function_definition",
          "line_start": 1667,
          "line_end": 1672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_next_url",
          "type": "function_definition",
          "line_start": 1674,
          "line_end": 1684,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 1686,
          "line_end": 1693,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1695,
          "line_end": 1705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1707,
          "line_end": 1720,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.084,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 156,
        "avg_function_length": 8.6,
        "function_length_stddev": 7.31,
        "import_count": 38,
        "export_count": 0,
        "comment_lines": 91,
        "code_lines": 1630,
        "comment_ratio": 0.0529,
        "comment_what_ratio": 0.2698,
        "naming_avg_length": 8.05,
        "debug_artifacts": [],
        "ai_smell_count": 60,
        "ai_smell_density": 0.03681,
        "structural_uniformity": 0.15,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.63,
        "mechanical": 86.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\i18n.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 123,
      "functions": [
        {
          "name": "localized_js_catalog",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 7,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 10,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\publish.py",
      "language": "python",
      "line_count": 86,
      "token_estimate": 848,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0055,
          "ai_signals": []
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0055,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0055,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0055,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1149,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 72,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2555,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 11.17,
        "function_length_stddev": 10.93,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 85,
        "comment_ratio": 0.0116,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.07,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.023529,
        "structural_uniformity": 0.0216,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.85,
        "mechanical": 92.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\history.py",
      "language": "python",
      "line_count": 105,
      "token_estimate": 868,
      "functions": [
        {
          "name": "filter_is_commenting_action",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "user_can_unschedule",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        },
        {
          "name": "_annotate_queryset",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0742,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 3.38,
        "function_length_stddev": 2.45,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 105,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.15,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2753,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.31,
        "mechanical": 98.31,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\unpublish.py",
      "language": "python",
      "line_count": 97,
      "token_estimate": 929,
      "functions": [
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "get_object_display_title",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "get_next_url",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        },
        {
          "name": "get_objects_to_unpublish",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3789,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "unpublish",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 71,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2233,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0289,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 7.22,
        "function_length_stddev": 6.18,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 96,
        "comment_ratio": 0.0103,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.09,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.03125,
        "structural_uniformity": 0.1443,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.35,
        "mechanical": 87.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\locked_pages.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 525,
      "functions": [
        {
          "name": "get_users_for_filter",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4041,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0541,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0541,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9.33,
        "function_length_stddev": 6.81,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 70,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.83,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.028571,
        "structural_uniformity": 0.2707,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.02,
        "mechanical": 91.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\viewsets\\model.py",
      "language": "python",
      "line_count": 730,
      "token_estimate": 6801,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 118,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2723,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "permission_policy",
          "type": "decorated_definition",
          "line_start": 127,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "pk_path_converter",
          "type": "decorated_definition",
          "line_start": 131,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "name",
          "type": "decorated_definition",
          "line_start": 149,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 152,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "reorder_view_enabled",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_index_view_kwargs",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 186,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2331,
          "ai_signals": []
        },
        {
          "name": "get_add_view_kwargs",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_edit_view_kwargs",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_delete_view_kwargs",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_history_view_kwargs",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_usage_view_kwargs",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_inspect_view_kwargs",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_copy_view_kwargs",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_reorder_view_kwargs",
          "type": "function_definition",
          "line_start": 257,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "index_view",
          "type": "decorated_definition",
          "line_start": 263,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "index_results_view",
          "type": "decorated_definition",
          "line_start": 269,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "add_view",
          "type": "decorated_definition",
          "line_start": 275,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "edit_view",
          "type": "decorated_definition",
          "line_start": 279,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "delete_view",
          "type": "decorated_definition",
          "line_start": 283,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "history_view",
          "type": "decorated_definition",
          "line_start": 289,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "history_results_view",
          "type": "decorated_definition",
          "line_start": 295,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "usage_view",
          "type": "decorated_definition",
          "line_start": 301,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "inspect_view",
          "type": "decorated_definition",
          "line_start": 307,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "copy_view",
          "type": "decorated_definition",
          "line_start": 313,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "reorder_view",
          "type": "decorated_definition",
          "line_start": 317,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_templates",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 329,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 332,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 332,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 333,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 333,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 334,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "index_template_name",
          "type": "decorated_definition",
          "line_start": 340,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 345,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 346,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 346,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 347,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "index_results_template_name",
          "type": "decorated_definition",
          "line_start": 355,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 356,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 360,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 360,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 361,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 361,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 362,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 363,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 367,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "create_template_name",
          "type": "decorated_definition",
          "line_start": 370,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 375,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 376,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 376,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 377,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "edit_template_name",
          "type": "decorated_definition",
          "line_start": 385,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 390,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 391,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 391,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 392,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "delete_template_name",
          "type": "decorated_definition",
          "line_start": 400,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 405,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 406,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 406,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 407,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "history_template_name",
          "type": "decorated_definition",
          "line_start": 415,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 420,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 421,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 421,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 422,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "inspect_template_name",
          "type": "decorated_definition",
          "line_start": 430,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 435,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 436,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 436,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 437,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "list_display",
          "type": "decorated_definition",
          "line_start": 445,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "list_filter",
          "type": "decorated_definition",
          "line_start": 473,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "filterset_class",
          "type": "decorated_definition",
          "line_start": 489,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_fields",
          "type": "decorated_definition",
          "line_start": 498,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_backend_name",
          "type": "decorated_definition",
          "line_start": 507,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "list_export",
          "type": "decorated_definition",
          "line_start": 515,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "export_headings",
          "type": "decorated_definition",
          "line_start": 523,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "export_filename",
          "type": "decorated_definition",
          "line_start": 531,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "menu_label",
          "type": "decorated_definition",
          "line_start": 540,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 541,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "menu_item_class",
          "type": "decorated_definition",
          "line_start": 544,
          "line_end": 557,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "formfield_for_dbfield",
          "type": "function_definition",
          "line_start": 559,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 585,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_form_fields",
          "type": "function_definition",
          "line_start": 587,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_exclude_form_fields",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 599,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 620,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 620,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3846,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "_edit_handler",
          "type": "decorated_definition",
          "line_start": 622,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "url_finder_class",
          "type": "decorated_definition",
          "line_start": 630,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "register_admin_url_finder",
          "type": "function_definition",
          "line_start": 641,
          "line_end": 642,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 642,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 642,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 642,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_reference_index",
          "type": "function_definition",
          "line_start": 644,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 646,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 646,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 646,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 646,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 646,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 646,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 646,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_permissions_to_register",
          "type": "function_definition",
          "line_start": 648,
          "line_end": 663,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 656,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 656,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_permissions",
          "type": "function_definition",
          "line_start": 665,
          "line_end": 666,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 698,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 700,
          "line_end": 709,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0664,
          "ai_signals": []
        },
        {
          "name": "get_app_label_from_subitems",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 725,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 721,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 722,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 723,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 724,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "menu_label",
          "type": "decorated_definition",
          "line_start": 727,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 728,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 729,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 59,
        "avg_function_length": 9.37,
        "function_length_stddev": 6.79,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 222,
        "code_lines": 508,
        "comment_ratio": 0.3041,
        "comment_what_ratio": 0.0571,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 62,
        "ai_smell_density": 0.122047,
        "structural_uniformity": 0.2751,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.49,
        "mechanical": 73.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\datetime.py",
      "language": "python",
      "line_count": 166,
      "token_estimate": 1213,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 28,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_config",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 34,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 48,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 75,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_config",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 79,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 86,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 90,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 126,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 127,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 128,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_config",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 134,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 135,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 137,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 147,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 151,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4271,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0771,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 6.8,
        "function_length_stddev": 4.18,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 165,
        "comment_ratio": 0.006,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.44,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.078788,
        "structural_uniformity": 0.3856,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.54,
        "mechanical": 78.54,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\tests\\test_documents.py",
      "language": "python",
      "line_count": 619,
      "token_estimate": 5759,
      "functions": [
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "get_document_id_list",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 30,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 30,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 30,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 30,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 48,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 23,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 76,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 76,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 76,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 76,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 78,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 87,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 87,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 87,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 87,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 89,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 98,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 98,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 98,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 98,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 100,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 105,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 105,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 105,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 107,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 115,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 115,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 115,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 115,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 117,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 122,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 122,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 122,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 122,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 124,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 129,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 129,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 129,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 129,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 131,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields_then_remove_something",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 140,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 140,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 140,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 140,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 142,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_tags",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 150,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 150,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 150,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 150,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 152,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 157,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 157,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 157,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 157,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 166,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 166,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 166,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 166,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 173,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 173,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 173,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 173,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 180,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 180,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 180,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 180,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_exact_filter",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 189,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 189,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 189,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 189,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_on_id",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 196,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 196,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 196,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 196,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_tags",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 202,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 202,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 202,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 205,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 205,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 205,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 205,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 212,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 212,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 212,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 212,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 226,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 226,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 226,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 226,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_backwards",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 233,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 233,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 233,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 233,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 240,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 240,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 240,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 244,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 244,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 244,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_backwards_gives_error",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 251,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 251,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 251,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 251,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_with_offset_gives_error",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 260,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 260,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 260,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 260,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 269,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 269,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 269,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 269,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_only_two_items_returned",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 279,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 280,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 280,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 280,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 280,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_total_count",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 285,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 286,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 286,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 286,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 286,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 290,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 290,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 295,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 295,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 295,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 295,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_too_high_gives_error",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 301,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 302,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 302,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 302,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 302,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_max_none_gives_no_errors",
          "type": "decorated_definition",
          "line_start": 307,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 309,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 310,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 310,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 310,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 310,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 313,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 313,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=None)"
          ]
        },
        {
          "name": "test_limit_maximum_can_be_changed",
          "type": "decorated_definition",
          "line_start": 315,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 317,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 318,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 318,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 318,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 318,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=10)"
          ]
        },
        {
          "name": "test_limit_default_changes_with_max",
          "type": "decorated_definition",
          "line_start": 323,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 328,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 328,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 328,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 328,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=2)"
          ]
        },
        {
          "name": "test_offset_5_usually_appears_5th_in_list",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 336,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 336,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 336,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 336,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_5_moves_after_offset",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 342,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 342,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 342,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 342,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_total_count",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 348,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 348,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 348,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 348,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 352,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 352,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 357,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 357,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 357,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 357,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "get_document_id_list",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "test_search_for_james_joyce",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 375,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 375,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 375,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 375,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_order",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 387,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 383,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 383,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 383,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 383,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_when_disabled_gives_error",
          "type": "decorated_definition",
          "line_start": 389,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 392,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 392,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 392,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_SEARCH_ENABLED=False)"
          ]
        },
        {
          "name": "test_search_when_filtering_by_tag_gives_error",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 399,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 399,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 399,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 399,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 423,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 423,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 423,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 423,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 416,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tags",
          "type": "function_definition",
          "line_start": 458,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 459,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 459,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 459,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 460,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 460,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 460,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 463,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 463,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 463,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 463,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_download_url_with_custom_base_url",
          "type": "decorated_definition",
          "line_start": 468,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 471,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 471,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 471,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 471,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_BASE_URL=\"http://api.example.com/\")"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 481,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 483,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 483,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 483,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 483,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 488,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 490,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 490,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 490,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 490,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 497,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 497,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 497,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 497,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_fields",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 504,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 504,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 504,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 504,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 516,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 511,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 511,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 511,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 511,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 518,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 520,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 520,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 520,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 520,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 527,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 527,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 527,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 527,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 534,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 534,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 534,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 534,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields_on_non_relational_field_gives_error",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 541,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 541,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 541,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 541,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "test_without_parameters",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 560,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 560,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 560,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 560,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_id",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 571,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": []
        },
        {
          "name": "test_find_by_id_nonexistent",
          "type": "function_definition",
          "line_start": 573,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 580,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 580,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 580,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 580,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 598,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 603,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1103,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_resave_document_purges",
          "type": "function_definition",
          "line_start": 608,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 610,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 610,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_document_purges",
          "type": "function_definition",
          "line_start": 614,
          "line_end": 618,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 616,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 616,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4603,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 64,
        "avg_function_length": 7.81,
        "function_length_stddev": 7.01,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 590,
        "comment_ratio": 0.0468,
        "comment_what_ratio": 0.4483,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 252,
        "ai_smell_density": 0.427119,
        "structural_uniformity": 0.103,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.05,
        "mechanical": 74.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\migrations\\migrate_operation.py",
      "language": "python",
      "line_count": 360,
      "token_estimate": 3650,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 24,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_magic_dimension_number",
              "severity": "low",
              "line": 24,
              "description": "Hardcoded embedding dimension as magic number -- breaks when switching models",
              "fix_type": "deterministic"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 61,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2419,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "migration_name_fragment",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "migrate_stream_data_forward",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 12,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 109,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 4
          },
          "anti_patterns": [
            {
              "id": "mlops_no_circuit_breaker_inference",
              "severity": "medium",
              "line": 92,
              "description": "ML inference endpoint without circuit breaker -- cascading failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 93,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 93,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 98,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 98,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 102,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 112,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 112,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 116,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 116,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 129,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 157,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 160,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 167,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 175,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 210,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 210,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_revision_model",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 217,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 217,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_has_revisions",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "append_instance_data_for_revision_query",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 223,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 223,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_make_revision_query",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 226,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 226,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_revision_queryset",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 230,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 230,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "bulk_update",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "get_is_live_or_latest_revision",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "get_revision_model",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 248,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 248,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 249,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 249,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_has_revisions",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 252,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 252,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "append_instance_data_for_revision_query",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 254,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 254,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 257,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_make_revision_query",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 259,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 259,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 271,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_is_live_or_latest_revision",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "_latest_revision_ids",
          "type": "decorated_definition",
          "line_start": 289,
          "line_end": 298,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 292,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "get_revision_model",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 310,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 310,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 311,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 311,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_has_revisions",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        },
        {
          "name": "append_instance_data_for_revision_query",
          "type": "function_definition",
          "line_start": 328,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 328,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 328,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 333,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 336,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_make_revision_query",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 338,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 338,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 339,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 339,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 340,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 340,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 348,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 356,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_is_live_or_latest_revision",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0438,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 12.28,
        "function_length_stddev": 22.95,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 64,
        "code_lines": 296,
        "comment_ratio": 0.1778,
        "comment_what_ratio": 0.2188,
        "naming_avg_length": 8.55,
        "debug_artifacts": [],
        "ai_smell_count": 59,
        "ai_smell_density": 0.199324,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.1,
        "mechanical": 71.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\migrations\\0005_alter_formsubmission_form_data.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 128,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 21,
        "comment_ratio": 0.0455,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\tests\\utils.py",
      "language": "python",
      "line_count": 225,
      "token_estimate": 1510,
      "functions": [
        {
          "name": "make_form_page",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 25,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 32,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3757,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "make_form_page_with_custom_submission",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 71,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 78,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3673,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "make_form_page_with_redirect",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 109,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 116,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3673,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "make_types_test_form_page",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 100,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 138,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 145,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 152,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 166,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 173,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 180,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 188,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 196,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 204,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 212,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 125,
              "description": "Function is 100 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 100 lines (> 37 dynamic threshold)",
                "impact": "Function make_types_test_form_page is 100 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 51.75,
        "function_length_stddev": 32.17,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 224,
        "comment_ratio": 0.0044,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.47,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.098214,
        "structural_uniformity": 0.3784,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 62.92,
        "mechanical": 62.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\azure.py",
      "language": "python",
      "line_count": 180,
      "token_estimate": 1483,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 21,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "purge_batch",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 27,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_rate_limiter",
              "severity": "high",
              "line": 31,
              "description": "LLM calls without rate limiting -- hits API rate limits under load, cascading failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 31,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_default_credentials",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 36,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_credentials",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_default_subscription_id",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 56,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3999,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "_get_subscription_id",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_client_kwargs",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_path",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_client",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_purge_kwargs",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_purge_content",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 107,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 112,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 113,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 127,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_client_class",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_client_kwargs",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_make_purge_call",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 145,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 145,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 156,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 156,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 157,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_client_class",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_get_client_kwargs",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1082,
          "ai_signals": []
        },
        {
          "name": "_make_purge_call",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 175,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 175,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 178,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 178,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 7.1,
        "function_length_stddev": 3.26,
        "import_count": 9,
        "export_count": 3,
        "comment_lines": 22,
        "code_lines": 158,
        "comment_ratio": 0.1222,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 19,
        "ai_smell_density": 0.120253,
        "structural_uniformity": 0.541,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.28,
        "mechanical": 73.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\tasks.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 695,
      "functions": [
        {
          "name": "purge_urls_from_cache_task",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 41,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 55,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 55,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 65,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 68,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 79,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 83,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 16,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function purge_urls_from_cache_task is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "task()"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 68,
        "function_length_stddev": 0.0,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 76,
        "comment_ratio": 0.0952,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 8.02,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.131579,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 60.0,
        "mechanical": 60.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\apps.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 169,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.037,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 12.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 71,
      "token_estimate": 566,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 71,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_import_forms.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 230,
      "functions": [
        {
          "name": "test_file_input_generates_proper_accept",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 9,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4999,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "test_choices_get_appended_with_intro_label_if_multiple",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4999,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "test_choices_does_not_get_generated_label_if_single_choice",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 19,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4999,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.73)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 4.33,
        "function_length_stddev": 1.15,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.19,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.7335,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\utils.py",
      "language": "python",
      "line_count": 50,
      "token_estimate": 321,
      "functions": [
        {
          "name": "write_to_file_storage",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4357,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_supported_extensions",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0857,
          "ai_signals": []
        },
        {
          "name": "get_format_cls_by_extension",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0857,
          "ai_signals": []
        },
        {
          "name": "get_import_formats",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0857,
          "ai_signals": []
        },
        {
          "name": "get_file_storage",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0857,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 6.2,
        "function_length_stddev": 3.9,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 50,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.69,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.02,
        "structural_uniformity": 0.3712,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.2,
        "mechanical": 91.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\routable_page\\tests.py",
      "language": "python",
      "line_count": 518,
      "token_estimate": 4706,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 25,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4393,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_resolve_index_route_view",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_archive_by_year_view",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_archive_by_author_view",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_archive_by_title_view",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_archive_by_category_view",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_external_view",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_resolve_external_view_other_route",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_index_route_view",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_archive_by_year_view",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_archive_by_author_view",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_archive_by_title_view",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_overridden_name",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_overridden_name_default_doesnt_work",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_external_view",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_reverse_external_view_other_route",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_index_route_view",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 132,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_get_render_method_route_view",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 143,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 144,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4393,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_render_method_route_view_with_custom_template",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 157,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3809,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_get_render_method_route_view_with_arg",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4393,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_routable_page_with_overridden_index_route",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_archive_by_year_view",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_earlier_view_takes_precedence",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_archive_by_author_view",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_archive_by_title_view",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_archive_by_category_view",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_external_view",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_get_external_view_other_route",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_routable_page_can_have_instance_bound_descriptors",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_warning_path_with_regex",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_index_route",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_year_view",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_author_view",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_title_view",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_category_view",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view_without_append_slash",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_index_route",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_year_view",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_author_view",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_title_view",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_category_view",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view_without_append_slash",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_index_route",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_year_view",
          "type": "function_definition",
          "line_start": 450,
          "line_end": 457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_author_view",
          "type": "function_definition",
          "line_start": 459,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_title_view",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_archive_by_category_view",
          "type": "function_definition",
          "line_start": 482,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        },
        {
          "name": "test_templatetag_reverse_external_view_without_append_slash",
          "type": "function_definition",
          "line_start": 505,
          "line_end": 517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0893,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 54,
        "avg_function_length": 7.89,
        "function_length_stddev": 4.37,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 508,
        "comment_ratio": 0.0193,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.3,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.011811,
        "structural_uniformity": 0.4463,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.55,
        "mechanical": 96.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 604,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 57,
        "comment_ratio": 0.1231,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\views\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 9,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\jinja2tags.py",
      "language": "python",
      "line_count": 93,
      "token_estimate": 709,
      "functions": [
        {
          "name": "__missing__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0043,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0043,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0043,
          "ai_signals": []
        },
        {
          "name": "__missing__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 42,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3543,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_setting",
          "type": "decorated_definition",
          "line_start": 64,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 76,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.223,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "jinja2.pass_context"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0043,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 9.67,
        "function_length_stddev": 9.46,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 80,
        "comment_ratio": 0.1398,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.05,
        "structural_uniformity": 0.0215,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.25,
        "mechanical": 85.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\generic\\test_admin.py",
      "language": "python",
      "line_count": 549,
      "token_estimate": 5587,
      "functions": [
        {
          "name": "login_only_admin",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_menu_item_in_admin",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_menu_item_no_permissions",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_menu_item_icon",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "edit_url",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_file_upload_multipart",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_create_restricted_field_without_any_permission",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 118,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2308,
          "ai_signals": []
        },
        {
          "name": "test_create_restricted_field_without_field_permission",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 149,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 152,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 161,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 162,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_restricted_field",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 184,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 187,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 197,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 198,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_edit_setting_hook_get",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 226,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4058,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_before_edit_setting_hook_post",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 244,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2808,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_setting_hook",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 267,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2732,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 284,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_non_existent_model",
          "type": "function_definition",
          "line_start": 286,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 286,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 286,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_with_icon",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 295,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_for_request",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_edit_restricted_field",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 336,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 339,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 348,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 349,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 325,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_restricted_field is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_restricted_field_without_field_permission",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 375,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 378,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 386,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 387,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_restricted_field_without_any_permission",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2235,
          "ai_signals": []
        },
        {
          "name": "test_before_edit_setting_hook_get",
          "type": "function_definition",
          "line_start": 436,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 447,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4058,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_before_edit_setting_hook_post",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 465,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2808,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_setting_hook",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 487,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2808,
          "ai_signals": []
        },
        {
          "name": "test_registered_permission",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 497,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 501,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4641,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_default_model_introspection",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_with_custom_panels",
          "type": "function_definition",
          "line_start": 523,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_with_custom_edit_handler",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        },
        {
          "name": "test_get_permissions",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1141,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 38,
        "avg_function_length": 12.53,
        "function_length_stddev": 11.22,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 518,
        "comment_ratio": 0.0565,
        "comment_what_ratio": 0.4667,
        "naming_avg_length": 8.14,
        "debug_artifacts": [],
        "ai_smell_count": 32,
        "ai_smell_density": 0.061776,
        "structural_uniformity": 0.1039,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.03,
        "mechanical": 83.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\site_specific\\test_forms.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 313,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_site_order_by_hostname",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 11,
        "function_length_stddev": 11.31,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.7,
        "mechanical": 99.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\forms.py",
      "language": "python",
      "line_count": 133,
      "token_estimate": 1315,
      "functions": [
        {
          "name": "create_option",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 86,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 58,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 47,
              "description": "Function is 86 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 86 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 86 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.11,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 47.5,
        "function_length_stddev": 54.45,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 119,
        "comment_ratio": 0.1053,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.48,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.016807,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.8,
        "mechanical": 68.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\tests\\test_wagtail_hooks.py",
      "language": "python",
      "line_count": 590,
      "token_estimate": 6208,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_register_admin_urls_page",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_register_admin_urls_snippet",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_register_submit_translation_permission",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_listing_more_buttons",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 76,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 76,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 78,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 78,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 88,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 88,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 89,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 89,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 91,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 91,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 94,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 96,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_snippet_buttons",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 115,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 121,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 122,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 122,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 124,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "unpublish_hook",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "missing_hook_action",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_double_registered_hook",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_page_tree_sync_on",
          "type": "decorated_definition",
          "line_start": 160,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 165,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True)"
          ]
        },
        {
          "name": "test_page_tree_sync_off",
          "type": "decorated_definition",
          "line_start": 171,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 176,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=False)"
          ]
        },
        {
          "name": "test_missing_hook_action",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 185,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True)"
          ]
        },
        {
          "name": "test_other_l10n_pages_were_unpublished",
          "type": "decorated_definition",
          "line_start": 190,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True, WAGTAIL_I18N_ENABLED=True\n    )"
          ]
        },
        {
          "name": "test_move_translated_pages",
          "type": "decorated_definition",
          "line_start": 220,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 220,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_move_translated_pages is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1475,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True, WAGTAIL_I18N_ENABLED=True\n    )"
          ]
        },
        {
          "name": "test_unmovable_translation_pages",
          "type": "decorated_definition",
          "line_start": 274,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 274,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_unmovable_translation_pages is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1428,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=False)"
          ]
        },
        {
          "name": "test_translation_count_in_context",
          "type": "decorated_definition",
          "line_start": 332,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 362,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2814,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE=True, WAGTAIL_I18N_ENABLED=True\n    )"
          ]
        },
        {
          "name": "delete_hook",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_construct_translated_pages_to_cascade_actions_when_deleting",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 385,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 381,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4314,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_translated_pages",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_delete_confirmation_template",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 437,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 438,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 441,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3902,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_deleting_page_with_divergent_translation_tree",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 444,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_deleting_page_with_divergent_translation_tree is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1407,
          "ai_signals": []
        },
        {
          "name": "test_alias_pages_when_deleting_source_page",
          "type": "function_definition",
          "line_start": 504,
          "line_end": 540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0814,
          "ai_signals": []
        },
        {
          "name": "test_translation_alias_pages_when_deleting_source_page",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 589,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 542,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_translation_alias_pages_when_deleting_source_page is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1543,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 23.09,
        "function_length_stddev": 18.49,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 93,
        "code_lines": 497,
        "comment_ratio": 0.1576,
        "comment_what_ratio": 0.2078,
        "naming_avg_length": 8.11,
        "debug_artifacts": [],
        "ai_smell_count": 37,
        "ai_smell_density": 0.074447,
        "structural_uniformity": 0.1993,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.03,
        "mechanical": 76.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\sitemaps\\views.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 217,
      "functions": [
        {
          "name": "index",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1112,
          "ai_signals": []
        },
        {
          "name": "sitemap",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1112,
          "ai_signals": []
        },
        {
          "name": "prepare_sitemaps",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 23,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4612,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5.67,
        "function_length_stddev": 2.52,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 29,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.9,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.034483,
        "structural_uniformity": 0.5559,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.88,
        "mechanical": 85.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\table_block\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 63,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\api\\admin\\views.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 26,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 16.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\forms.py",
      "language": "python",
      "line_count": 171,
      "token_estimate": 1582,
      "functions": [
        {
          "name": "formfield_for_dbfield",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4573,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4573,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1073,
          "ai_signals": []
        },
        {
          "name": "clean_tags",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1073,
          "ai_signals": []
        },
        {
          "name": "get_document_base_form",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1073,
          "ai_signals": []
        },
        {
          "name": "get_document_form",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1073,
          "ai_signals": []
        },
        {
          "name": "get_document_multi_form",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1073,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 15.57,
        "function_length_stddev": 9.34,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 149,
        "comment_ratio": 0.1287,
        "comment_what_ratio": 0.1364,
        "naming_avg_length": 7.41,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.026846,
        "structural_uniformity": 0.4,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.69,
        "mechanical": 84.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0007_merge.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 79,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 12,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.36,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_document_chooser.py",
      "language": "python",
      "line_count": 281,
      "token_estimate": 2989,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        },
        {
          "name": "login_as_superuser",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        },
        {
          "name": "login_as_editor",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 32,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 34,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 37,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 47,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "login_as_baker",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 58,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 66,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 74,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        },
        {
          "name": "test_chooser_docs_exist",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 94,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2899,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_chooser_only_docs_in_chooseable_collection_appear",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 120,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2648,
          "ai_signals": []
        },
        {
          "name": "test_chooser_collection_selector_appears_only_if_multiple_collections_are_choosable",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 136,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 146,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 155,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4145,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test_chooser_no_docs_upload_allowed",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 169,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3749,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_chooser_no_docs_upload_forbidden",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 184,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.339,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_results_docs_exist",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 200,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 202,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_results_no_docs_upload_allowed",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 217,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 219,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_results_no_docs_upload_forbidden",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 232,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 234,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_results_no_collection_docs_upload_allowed",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 254,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 256,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4239,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_results_no_collection_docs_upload_forbidden",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 275,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 277,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4557,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 16.33,
        "function_length_stddev": 9.19,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 67,
        "code_lines": 214,
        "comment_ratio": 0.2384,
        "comment_what_ratio": 0.0909,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 25,
        "ai_smell_density": 0.116822,
        "structural_uniformity": 0.4376,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.1,
        "mechanical": 73.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_views.py",
      "language": "python",
      "line_count": 449,
      "token_estimate": 3977,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 19,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 19,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 23,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 23,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "read_response",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 31,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 45,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 45,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_response_code",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_content_disposition_header",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_inline_content_disposition_header",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_content_security_policy",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_no_sniff_content_type",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_non_local_filesystem_headers",
          "type": "decorated_definition",
          "line_start": 83,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 83,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 83,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 84,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 84,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 96,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 96,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.documents.views.serve.hooks\")",
            "mock.patch(\"wagtail.documents.views.serve.get_object_or_404\")"
          ]
        },
        {
          "name": "test_non_local_filesystem_inline_headers",
          "type": "decorated_definition",
          "line_start": 112,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 112,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 112,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 113,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 113,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 127,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 127,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.documents.views.serve.hooks\")",
            "mock.patch(\"wagtail.documents.views.serve.get_object_or_404\")"
          ]
        },
        {
          "name": "test_content_length_header",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_content_type_header",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_is_streaming_response",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_content",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_document_served_fired",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 152,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 152,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 154,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 154,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 163,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 163,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_nonexistent_document",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 168,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 168,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_incorrect_filename",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 179,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 179,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_etag_header",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "clear_sendfile_cache",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 197,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 197,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 200,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 200,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 201,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 201,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 210,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 210,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_document_url_should_point_to_serve_view",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 214,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 214,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 215,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 215,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_redirect",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 239,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 239,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_url_should_point_directly_to_file_storage_url",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_redirect",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 247,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 247,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 273,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 273,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 276,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 276,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 277,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 277,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_document_url_should_point_to_serve_view",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 284,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 283,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 283,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 284,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 284,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_redirect",
          "type": "function_definition",
          "line_start": 286,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 287,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 287,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 288,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 288,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 301,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 306,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 306,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 318,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 318,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clear_sendfile_cache",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_sendfile_xsendfile_backend",
          "type": "decorated_definition",
          "line_start": 327,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": [],
          "decorators": [
            "override_settings(SENDFILE_BACKEND=\"sendfile.backends.xsendfile\")"
          ]
        },
        {
          "name": "test_sendfile_mod_wsgi_backend",
          "type": "decorated_definition",
          "line_start": 335,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        SENDFILE_BACKEND=\"sendfile.backends.mod_wsgi\",\n        SENDFILE_ROOT=settings.MEDIA_ROOT,\n        SENDFILE_URL=settings.MEDIA_URL[:-1],\n    )"
          ]
        },
        {
          "name": "test_sendfile_nginx_backend",
          "type": "decorated_definition",
          "line_start": 350,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        SENDFILE_BACKEND=\"sendfile.backends.nginx\",\n        SENDFILE_ROOT=settings.MEDIA_ROOT,\n        SENDFILE_URL=settings.MEDIA_URL[:-1],\n    )"
          ]
        },
        {
          "name": "test_content_security_policy",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "test_no_sniff_content_type",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 383,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2977,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0285,
          "ai_signals": []
        },
        {
          "name": "read_response",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 398,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_response_code",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 402,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 402,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_non_local_filesystem_unicode_content_disposition_header",
          "type": "decorated_definition",
          "line_start": 409,
          "line_end": 448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 409,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 409,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 410,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 410,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 427,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 427,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 431,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 431,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 438,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 445,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 409,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_non_local_filesystem_unicode_content_disposition_header is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3785,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.documents.views.serve.hooks\")",
            "mock.patch(\"wagtail.documents.views.serve.get_object_or_404\")"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 300,
              "description": "Unused import: import sendfile",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'sendfile' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import sendfile",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 48,
        "avg_function_length": 7.46,
        "function_length_stddev": 7.37,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 32,
        "code_lines": 417,
        "comment_ratio": 0.0713,
        "comment_what_ratio": 0.1304,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 79,
        "ai_smell_density": 0.189448,
        "structural_uniformity": 0.012,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.3,
        "mechanical": 74.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\bulk_actions\\document_bulk_action.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 342,
      "functions": [
        {
          "name": "get_all_objects_in_listing_query",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 12,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 12,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 23,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 23,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5361,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.89)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1861,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.89)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 39,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.47,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.102564,
        "structural_uniformity": 0.8912,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.1,
        "mechanical": 70.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\apps.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 111,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 14,
              "description": "Unused import: from . import signal_handlers",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'signal_handlers' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from . import signal_handlers",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 8.55,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\instagram.py",
      "language": "python",
      "line_count": 92,
      "token_estimate": 763,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0333,
          "ai_signals": []
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 42,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 42,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 43,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 43,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 55,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 55,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 61,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 40,
              "description": "Function is 49 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 30 dynamic threshold)",
                "impact": "Function find_embed is 49 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3833,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 28,
        "function_length_stddev": 29.7,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 82,
        "comment_ratio": 0.1087,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.63,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.097561,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.71,
        "mechanical": 59.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0005_specify_thumbnail_url_max_length.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 107,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\rich_text\\__init__.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 169,
      "functions": [
        {
          "name": "get_model",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 13,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 13,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4434,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_instance",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0934,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0934,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 4.33,
        "function_length_stddev": 2.31,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 22,
        "comment_ratio": 0.1852,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.21,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.090909,
        "structural_uniformity": 0.4671,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.27,
        "mechanical": 77.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\tests\\test_embeds.py",
      "language": "python",
      "line_count": 1145,
      "token_estimate": 10484,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "accept",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_defaults_to_oembed",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_new_find_oembed",
          "type": "decorated_definition",
          "line_start": 70,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILEMBEDS_FINDERS=[{\"class\": \"wagtail.embeds.finders.oembed\"}]\n    )"
          ]
        },
        {
          "name": "test_new_find_embedly",
          "type": "decorated_definition",
          "line_start": 79,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILEMBEDS_FINDERS=[\n            {\n                \"class\": \"wagtail.embeds.finders.embedly\",\n                \"key\": \"foo\",\n            }\n        ]\n    )"
          ]
        },
        {
          "name": "test_new_find_oembed_with_options",
          "type": "decorated_definition",
          "line_start": 94,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILEMBEDS_FINDERS=[\n            {\"class\": \"wagtail.embeds.finders.oembed\", \"options\": {\"foo\": \"bar\"}}\n        ]\n    )"
          ]
        },
        {
          "name": "test_find_instagram_oembed_with_options",
          "type": "decorated_definition",
          "line_start": 106,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILEMBEDS_FINDERS=[\n            {\n                \"class\": \"wagtail.embeds.finders.instagram\",\n                \"app_id\": \"1234567890\",\n                \"app_secret\": \"abcdefghijklmnop\",\n            },\n        ]\n    )"
          ]
        },
        {
          "name": "test_find_facebook_oembed_with_options",
          "type": "decorated_definition",
          "line_start": 125,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILEMBEDS_FINDERS=[\n            {\n                \"class\": \"wagtail.embeds.finders.facebook\",\n                \"app_id\": \"1234567890\",\n                \"app_secret\": \"abcdefghijklmnop\",\n            },\n        ]\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "dummy_finder",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_get_embed_responsive",
          "type": "decorated_definition",
          "line_start": 162,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 169,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 188,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 194,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 162,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_embed_responsive is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(WAGTAILEMBEDS_RESPONSIVE_HTML=True)"
          ]
        },
        {
          "name": "test_get_embed_nonresponsive",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 206,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4908,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "dummy_cache_until_finder",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_get_embed_cache_until",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 233,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 240,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 247,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "dummy_finder_invalid_width",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_invalid_width",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 269,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_no_html",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 285,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_no_finders_available",
          "type": "decorated_definition",
          "line_start": 289,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 292,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "override_settings(WAGTAILEMBEDS_FINDERS=[])"
          ]
        },
        {
          "name": "test_get_embed_hash",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_alert_threshold",
              "severity": "high",
              "line": 299,
              "description": "Model monitoring without alert thresholds \u2014 degradation goes unnoticed",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_chooser",
          "type": "function_definition",
          "line_start": 308,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_chooser_with_edit_params",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 315,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 315,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 315,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 317,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_submit_valid_embed",
          "type": "decorated_definition",
          "line_start": 319,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 330,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 330,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 330,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 330,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_submit_unrecognised_embed",
          "type": "decorated_definition",
          "line_start": 334,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 344,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 344,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 344,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 344,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 346,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_embedly_oembed_called_with_correct_arguments",
          "type": "decorated_definition",
          "line_start": 350,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 358,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 360,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_401",
          "type": "decorated_definition",
          "line_start": 363,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_403",
          "type": "decorated_definition",
          "line_start": 378,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_404",
          "type": "decorated_definition",
          "line_start": 393,
          "line_end": 406,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_other_error",
          "type": "decorated_definition",
          "line_start": 408,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_html_conversion",
          "type": "decorated_definition",
          "line_start": 423,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 429,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 434,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_embedly_return_value",
          "type": "decorated_definition",
          "line_start": 436,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 436,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_embedly_return_value is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.254,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "unittest.skipIf(no_embedly, \"Embedly is not installed\")"
          ]
        },
        {
          "name": "test_oembed_invalid_provider",
          "type": "function_definition",
          "line_start": 482,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_oembed_invalid_request",
          "type": "decorated_definition",
          "line_start": 485,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_non_json_response",
          "type": "decorated_definition",
          "line_start": 494,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_photo_request",
          "type": "decorated_definition",
          "line_start": 514,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 527,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_return_values",
          "type": "decorated_definition",
          "line_start": 529,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_cache_until",
          "type": "decorated_definition",
          "line_start": 565,
          "line_end": 603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 565,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_oembed_cache_until is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2623,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"django.utils.timezone.now\")",
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_cache_until_as_string",
          "type": "decorated_definition",
          "line_start": 605,
          "line_end": 643,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 605,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_oembed_cache_until_as_string is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2623,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"django.utils.timezone.now\")",
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_accepts_known_provider",
          "type": "function_definition",
          "line_start": 645,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_oembed_doesnt_accept_unknown_provider",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_endpoint_with_format_param",
          "type": "decorated_definition",
          "line_start": 653,
          "line_end": 665,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 654,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 654,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 656,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_non_200_response",
          "type": "decorated_definition",
          "line_start": 667,
          "line_end": 681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_missing_type_field",
          "type": "decorated_definition",
          "line_start": 683,
          "line_end": 700,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_oembed_field_value_null",
          "type": "decorated_definition",
          "line_start": 702,
          "line_end": 736,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 740,
          "line_end": 755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_instagram_oembed_only_accepts_new_url_patterns",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_instagram_oembed_return_values",
          "type": "decorated_definition",
          "line_start": 778,
          "line_end": 803,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"urllib.request.urlopen\")"
          ]
        },
        {
          "name": "test_instagram_request_denied_401",
          "type": "function_definition",
          "line_start": 805,
          "line_end": 819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_instagram_request_not_found",
          "type": "function_definition",
          "line_start": 821,
          "line_end": 835,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_instagram_failed_request",
          "type": "function_definition",
          "line_start": 837,
          "line_end": 844,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 848,
          "line_end": 862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_facebook_oembed_accepts_various_url_patterns",
          "type": "function_definition",
          "line_start": 864,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_facebook_oembed_return_values",
          "type": "decorated_definition",
          "line_start": 871,
          "line_end": 896,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"urllib.request.urlopen\")"
          ]
        },
        {
          "name": "test_facebook_request_denied_401",
          "type": "function_definition",
          "line_start": 898,
          "line_end": 912,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_facebook_request_not_found",
          "type": "function_definition",
          "line_start": 914,
          "line_end": 924,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_facebook_failed_request",
          "type": "function_definition",
          "line_start": 926,
          "line_end": 933,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_direct_call",
          "type": "decorated_definition",
          "line_start": 937,
          "line_end": 943,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_call_from_template",
          "type": "decorated_definition",
          "line_start": 945,
          "line_end": 954,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 952,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_catches_embed_not_found",
          "type": "decorated_definition",
          "line_start": 956,
          "line_end": 965,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 963,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "set_up_embed_response",
          "type": "function_definition",
          "line_start": 969,
          "line_end": 985,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 987,
          "line_end": 1000,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 1002,
          "line_end": 1010,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_render",
          "type": "decorated_definition",
          "line_start": 1012,
          "line_end": 1024,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1021,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4418,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_render_within_structblock",
          "type": "decorated_definition",
          "line_start": 1026,
          "line_end": 1050,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1048,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3126,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_value_from_form",
          "type": "function_definition",
          "line_start": 1052,
          "line_end": 1067,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1060,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1066,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5226,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_default",
          "type": "function_definition",
          "line_start": 1069,
          "line_end": 1092,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ]
        },
        {
          "name": "test_clean_required",
          "type": "decorated_definition",
          "line_start": 1094,
          "line_end": 1107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_clean_non_required",
          "type": "decorated_definition",
          "line_start": 1109,
          "line_end": 1122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "test_clean_invalid_url",
          "type": "decorated_definition",
          "line_start": 1124,
          "line_end": 1144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1726,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.53)"
          ],
          "decorators": [
            "responses.activate"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 42,
              "description": "Unused import: import embedly",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'embedly' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import embedly",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 70,
        "avg_function_length": 14.34,
        "function_length_stddev": 9.62,
        "import_count": 30,
        "export_count": 0,
        "comment_lines": 46,
        "code_lines": 1099,
        "comment_ratio": 0.0402,
        "comment_what_ratio": 0.5333,
        "naming_avg_length": 7.44,
        "debug_artifacts": [],
        "ai_smell_count": 42,
        "ai_smell_density": 0.038217,
        "structural_uniformity": 0.3296,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.72,
        "mechanical": 88.72,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\forms.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 248,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0714,
          "ai_signals": []
        },
        {
          "name": "clean_password",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0714,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5.5,
        "function_length_stddev": 3.54,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 31,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3572,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.25,
        "mechanical": 97.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\api\\admin\\views.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 99,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 14.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\components.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 94,
      "functions": [
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0005_make_filter_spec_unique.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 101,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0013_make_rendition_upload_callable.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 135,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0021_image_file_hash.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 104,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\models.py",
      "language": "python",
      "line_count": 1549,
      "token_estimate": 14207,
      "functions": [
        {
          "name": "prefetch_renditions",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 84,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 84,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3256,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "get_upload_to",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_rendition_upload_to",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_rendition_storage",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 139,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 144,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3129,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "is_stored_locally",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 161,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_file_size",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 168,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 168,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "open_file",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 198,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1341,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "get_willow_image",
          "type": "decorated_definition",
          "line_start": 212,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "_get_image_dimensions",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_image_dimensions",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "_set_file_hash",
          "type": "function_definition",
          "line_start": 308,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_file_hash",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "_set_image_file_metadata",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_upload_to",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 349,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 350,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3012,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "get_usage",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "usage_url",
          "type": "decorated_definition",
          "line_start": 358,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__hash__",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 411,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_rect",
          "type": "function_definition",
          "line_start": 413,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_focal_point",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "has_focal_point",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 431,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "set_focal_point",
          "type": "function_definition",
          "line_start": 433,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_suggested_focal_point",
          "type": "function_definition",
          "line_start": 445,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 445,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function get_suggested_focal_point is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.111,
          "ai_signals": []
        },
        {
          "name": "get_rendition_model",
          "type": "decorated_definition",
          "line_start": 485,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 486,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 486,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_get_prefetched_renditions",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "_add_to_prefetched_renditions",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 499,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 503,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean_filter_for_svg",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 508,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 508,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 513,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 513,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 514,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 514,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 516,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 516,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 521,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 521,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_rendition",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 540,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 540,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2334,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "find_existing_rendition",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 577,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 577,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 581,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_rendition",
          "type": "function_definition",
          "line_start": 584,
          "line_end": 603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_renditions",
          "type": "function_definition",
          "line_start": 605,
          "line_end": 648,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 613,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 613,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 616,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 631,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 605,
              "description": "Function is 44 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 30 dynamic threshold)",
                "impact": "Function get_renditions is 44 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "find_existing_renditions",
          "type": "function_definition",
          "line_start": 650,
          "line_end": 723,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 662,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 662,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 675,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 678,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 685,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 687,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 704,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 715,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 720,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 650,
              "description": "Function is 74 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 30 dynamic threshold)",
                "impact": "Function find_existing_renditions is 74 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_renditions",
          "type": "function_definition",
          "line_start": 725,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 83,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 738,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 738,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 760,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 774,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 778,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 784,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 789,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 799,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 804,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 725,
              "description": "Function is 83 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 83 lines (> 30 dynamic threshold)",
                "impact": "Function create_renditions is 83 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "generate_rendition_instance",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 817,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 817,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "generate_rendition_file",
          "type": "function_definition",
          "line_start": 826,
          "line_end": 894,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-bare-except",
              "severity": "high",
              "line": 868,
              "description": "Bare except \u2014 catches all exceptions including SystemExit",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Bare except \u2014 catches all exceptions including SystemExit",
                "impact": "Bare except at line 868 catches all exceptions including SystemExit and KeyboardInterrupt",
                "recommendation": "Catch a specific exception type, or at minimum use 'except Exception'",
                "confidence": 1.0,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 840,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 840,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 856,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 826,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function generate_rendition_file is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2749,
          "ai_signals": [
            "High anti-pattern density (0.72)"
          ]
        },
        {
          "name": "is_portrait",
          "type": "function_definition",
          "line_start": 896,
          "line_end": 897,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "is_landscape",
          "type": "function_definition",
          "line_start": 899,
          "line_end": 900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "is_svg",
          "type": "function_definition",
          "line_start": 902,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "filename",
          "type": "decorated_definition",
          "line_start": 906,
          "line_end": 908,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_alt_text",
          "type": "decorated_definition",
          "line_start": 910,
          "line_end": 915,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_editable_by_user",
          "type": "function_definition",
          "line_start": 917,
          "line_end": 920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 959,
          "line_end": 961,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "expand_spec",
          "type": "decorated_definition",
          "line_start": 963,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 976,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 979,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 983,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "operations",
          "type": "decorated_definition",
          "line_start": 993,
          "line_end": 1012,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 997,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1002,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "transform_operations",
          "type": "decorated_definition",
          "line_start": 1014,
          "line_end": 1020,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "filter_operations",
          "type": "decorated_definition",
          "line_start": 1022,
          "line_end": 1028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_transform",
          "type": "function_definition",
          "line_start": 1030,
          "line_end": 1046,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1044,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1045,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_willow_image",
          "type": "decorated_definition",
          "line_start": 1048,
          "line_end": 1054,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 1056,
          "line_end": 1172,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 117,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 1056,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1074,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1075,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1106,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1106,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1056,
              "description": "Function is 117 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 117 lines (> 15 dynamic threshold)",
                "impact": "Function run is 117 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2007,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "get_cache_key",
          "type": "function_definition",
          "line_start": 1174,
          "line_end": 1188,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1177,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1178,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 1190,
          "line_end": 1193,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__hash__",
          "type": "function_definition",
          "line_start": 1195,
          "line_end": 1196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1206,
          "line_end": 1212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_width_srcset",
          "type": "decorated_definition",
          "line_start": 1214,
          "line_end": 1220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 1222,
          "line_end": 1230,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1232,
          "line_end": 1233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__bool__",
          "type": "function_definition",
          "line_start": 1235,
          "line_end": 1236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 1238,
          "line_end": 1241,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1261,
          "line_end": 1268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_formats",
          "type": "function_definition",
          "line_start": 1270,
          "line_end": 1288,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1278,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1279,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_fallback_format",
          "type": "function_definition",
          "line_start": 1290,
          "line_end": 1293,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1291,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 1295,
          "line_end": 1320,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1308,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1559,
          "ai_signals": []
        },
        {
          "name": "url",
          "type": "decorated_definition",
          "line_start": 1340,
          "line_end": 1342,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "alt",
          "type": "decorated_definition",
          "line_start": 1344,
          "line_end": 1355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 1357,
          "line_end": 1363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "attrs_dict",
          "type": "decorated_definition",
          "line_start": 1365,
          "line_end": 1377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "full_url",
          "type": "decorated_definition",
          "line_start": 1379,
          "line_end": 1384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "filter",
          "type": "decorated_definition",
          "line_start": 1386,
          "line_end": 1388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "focal_point",
          "type": "decorated_definition",
          "line_start": 1390,
          "line_end": 1395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "background_position_style",
          "type": "decorated_definition",
          "line_start": 1397,
          "line_end": 1413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "background_position_x",
          "type": "decorated_definition",
          "line_start": 1415,
          "line_end": 1435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "background_position_y",
          "type": "decorated_definition",
          "line_start": 1437,
          "line_end": 1457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "img_tag",
          "type": "function_definition",
          "line_start": 1459,
          "line_end": 1467,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 1469,
          "line_end": 1470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "get_upload_to",
          "type": "function_definition",
          "line_start": 1472,
          "line_end": 1478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 1480,
          "line_end": 1515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1503,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1185,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "construct_cache_key",
          "type": "decorated_definition",
          "line_start": 1517,
          "line_end": 1521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "cache_backend",
          "type": "decorated_definition",
          "line_start": 1523,
          "line_end": 1528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1527,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3712,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get_cache_key",
          "type": "function_definition",
          "line_start": 1530,
          "line_end": 1533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        },
        {
          "name": "purge_from_cache",
          "type": "function_definition",
          "line_start": 1535,
          "line_end": 1536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0212,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 82,
        "avg_function_length": 14.77,
        "function_length_stddev": 19.26,
        "import_count": 45,
        "export_count": 0,
        "comment_lines": 335,
        "code_lines": 1214,
        "comment_ratio": 0.2163,
        "comment_what_ratio": 0.1062,
        "naming_avg_length": 7.27,
        "debug_artifacts": [],
        "ai_smell_count": 83,
        "ai_smell_density": 0.068369,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.31,
        "mechanical": 77.31,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\static_src\\wagtailimages\\js\\add-multiple.js",
      "language": "javascript",
      "line_count": 232,
      "token_estimate": 1739,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 210,
        "comment_ratio": 0.0948,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.52,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\templatetags\\wagtailimages_tags.py",
      "language": "python",
      "line_count": 221,
      "token_estimate": 1782,
      "functions": [
        {
          "name": "image",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_token_counting",
              "severity": "high",
              "line": 42,
              "description": "Messages sent without checking total token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_conversation_history_limit",
              "severity": "high",
              "line": 42,
              "description": "Conversation history grows without bounds \u2014 eventually exceeds context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_token_counting",
              "severity": "high",
              "line": 42,
              "description": "Messages sent without estimating token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_conversation_no_limit",
              "severity": "high",
              "line": 42,
              "description": "Conversation history grows without bounds \u2014 exceeds 200k context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 49,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_token_counting",
              "severity": "high",
              "line": 65,
              "description": "Messages sent without checking total token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_conversation_history_limit",
              "severity": "high",
              "line": 65,
              "description": "Conversation history grows without bounds \u2014 eventually exceeds context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_token_counting",
              "severity": "high",
              "line": 65,
              "description": "Messages sent without estimating token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_conversation_no_limit",
              "severity": "high",
              "line": 65,
              "description": "Conversation history grows without bounds \u2014 exceeds 200k context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_token_counting",
              "severity": "high",
              "line": 69,
              "description": "Messages sent without checking total token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_conversation_history_limit",
              "severity": "high",
              "line": 69,
              "description": "Conversation history grows without bounds \u2014 eventually exceeds context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_token_counting",
              "severity": "high",
              "line": 69,
              "description": "Messages sent without estimating token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_conversation_no_limit",
              "severity": "high",
              "line": 69,
              "description": "Conversation history grows without bounds \u2014 exceeds 200k context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_token_counting",
              "severity": "high",
              "line": 73,
              "description": "Messages sent without checking total token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_conversation_history_limit",
              "severity": "high",
              "line": 73,
              "description": "Conversation history grows without bounds \u2014 eventually exceeds context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_token_counting",
              "severity": "high",
              "line": 73,
              "description": "Messages sent without estimating token count \u2014 exceeding context window causes API error",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_conversation_no_limit",
              "severity": "high",
              "line": 73,
              "description": "Conversation history grows without bounds \u2014 exceeds 200k context window and fails",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 15,
              "description": "Function is 79 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 30 dynamic threshold)",
                "impact": "Function image is 79 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3682,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "get_filter",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "validate_image",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 153,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1848,
          "ai_signals": []
        },
        {
          "name": "get_filters",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 179,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1932,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 204,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "image_url",
          "type": "decorated_definition",
          "line_start": 210,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 211,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 211,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 219,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 219,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3682,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.simple_tag()"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 20.67,
        "function_length_stddev": 23.09,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 206,
        "comment_ratio": 0.0679,
        "comment_what_ratio": 0.0909,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 26,
        "ai_smell_density": 0.126214,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 62.91,
        "mechanical": 62.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_bulk_actions\\test_bulk_delete.py",
      "language": "python",
      "line_count": 139,
      "token_estimate": 1280,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3304,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0971,
          "ai_signals": []
        },
        {
          "name": "test_delete_with_limited_permissions",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 39,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 47,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 52,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 60,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4471,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 67,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4471,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 78,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4471,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 85,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 87,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4471,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 101,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2267,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 133,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2813,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.5,
        "function_length_stddev": 9.27,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 131,
        "comment_ratio": 0.0576,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.083969,
        "structural_uniformity": 0.3604,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.53,
        "mechanical": 74.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_shortcuts.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 623,
      "functions": [
        {
          "name": "test_fallback_to_not_found",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.15,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "test_multiple_fallback_to_not_found",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.15,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "test_multiple_fallback_to_not_found_with_filters",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.15,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 16,
        "function_length_stddev": 4.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 65,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.75,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.2,
        "mechanical": 98.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\urls.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 44,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\chooser.py",
      "language": "python",
      "line_count": 415,
      "token_estimate": 3519,
      "functions": [
        {
          "name": "get_chosen_response_data",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_class",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_kwargs",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 72,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 76,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 76,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "per_page",
          "type": "decorated_definition",
          "line_start": 87,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_object_list",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "filter_object_list",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "get_filter_form",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "collections",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 127,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 127,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_usage_counts",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 147,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 148,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 148,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "layout",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 161,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 169,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 175,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 177,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 180,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 183,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 187,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 188,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 205,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 205,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 223,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 223,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 229,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 229,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_select_format_response",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 235,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 235,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 249,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 249,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 253,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 253,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 273,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_duplicate_found_response",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 289,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 289,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 292,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 292,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 283,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function render_duplicate_found_response is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 339,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_chosen_response_data",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 359,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 359,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 364,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "select_format_view",
          "type": "decorated_definition",
          "line_start": 393,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 397,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 397,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4142,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0642,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 10.6,
        "function_length_stddev": 9.55,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 403,
        "comment_ratio": 0.0289,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 9.64,
        "debug_artifacts": [],
        "ai_smell_count": 39,
        "ai_smell_density": 0.096774,
        "structural_uniformity": 0.0988,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.99,
        "mechanical": 73.99,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 57,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\purge_embeds.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 146,
      "functions": [
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 12,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.98,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.9,
        "mechanical": 93.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0003_add_uniqueness_constraint_on_group_page_permission.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 189,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 28,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0011_page_first_published_at.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 104,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0019_verbose_names_cleanup.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 307,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 41,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0026_group_collection_permission.py",
      "language": "python",
      "line_count": 61,
      "token_estimate": 474,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 61,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0034_page_live_revision.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 178,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0042_index_on_pagerevision_approved_go_live_at.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 133,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0050_workflow_rejected_to_needs_changes.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 301,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 40,
        "comment_ratio": 0.0244,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0058_page_alias_of.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 164,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0066_collection_management_permissions.py",
      "language": "python",
      "line_count": 78,
      "token_estimate": 724,
      "functions": [
        {
          "name": "grant_instance_level_collection_management_permissions",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 11,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 11,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 14,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 23,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 32,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5222,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.76)"
          ]
        },
        {
          "name": "revert_to_model_level_collection_management_permissions",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 44,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 44,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 60,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5222,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.76)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 29,
        "function_length_stddev": 7.07,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 70,
        "comment_ratio": 0.1026,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.26,
        "debug_artifacts": [],
        "ai_smell_count": 20,
        "ai_smell_density": 0.285714,
        "structural_uniformity": 0.7562,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.8,
        "mechanical": 59.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0074_revision_object_str.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 98,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0082_alter_workflowstate_content_type_notnull.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 246,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 33,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.08,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0090_remove_grouppagepermission_permission_type.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 268,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 36,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\locking.py",
      "language": "python",
      "line_count": 83,
      "token_estimate": 578,
      "functions": [
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 32,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0845,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_check_revision_mixin",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 52,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.279,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "with_content_json",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 70,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 70,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4345,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_lock",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0845,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 12,
        "function_length_stddev": 6.93,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 69,
        "comment_ratio": 0.1687,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.07,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.072464,
        "structural_uniformity": 0.4226,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.91,
        "mechanical": 79.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\sites.py",
      "language": "python",
      "line_count": 319,
      "token_estimate": 2765,
      "functions": [
        {
          "name": "get_site_for_hostname",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 20,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function get_site_for_hostname is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2559,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "natural_key",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "find_for_request",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "_find_for_request",
          "type": "decorated_definition",
          "line_start": 162,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "root_url",
          "type": "decorated_definition",
          "line_start": 175,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "clean_fields",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "get_site_root_paths",
          "type": "decorated_definition",
          "line_start": 207,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 207,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function get_site_root_paths is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0691,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "clear_site_root_paths_cache",
          "type": "decorated_definition",
          "line_start": 269,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        },
        {
          "name": "natural_key",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0118,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 13.6,
        "function_length_stddev": 17.55,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 49,
        "code_lines": 270,
        "comment_ratio": 0.1536,
        "comment_what_ratio": 0.0588,
        "naming_avg_length": 7.16,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.014815,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.38,
        "mechanical": 93.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permission_policies\\sites.py",
      "language": "python",
      "line_count": 196,
      "token_estimate": 1915,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "get_all_permissions_for_user",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "_user_has_global_permission",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3477,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "sites_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 169,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 169,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2692,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "sites_user_has_permission_for",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0434,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 13.58,
        "function_length_stddev": 10.64,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 45,
        "code_lines": 151,
        "comment_ratio": 0.2296,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.52,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.02649,
        "structural_uniformity": 0.2168,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.55,
        "mechanical": 88.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\home\\tests.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 325,
      "functions": [
        {
          "name": "test_root_create",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0863,
          "ai_signals": []
        },
        {
          "name": "test_homepage_create",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0863,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0863,
          "ai_signals": []
        },
        {
          "name": "test_homepage_is_renderable",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0863,
          "ai_signals": []
        },
        {
          "name": "test_homepage_template_used",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 42,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4363,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 4.2,
        "function_length_stddev": 2.39,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 34,
        "comment_ratio": 0.2093,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.029412,
        "structural_uniformity": 0.4316,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.65,
        "mechanical": 92.65,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\project_name\\wsgi.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 108,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 9,
        "comment_ratio": 0.4706,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\mysql\\query.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 17,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.43,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\sqlite\\utils.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 17,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0005_create_indexentry.py",
      "language": "python",
      "line_count": 50,
      "token_estimate": 374,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 49,
        "comment_ratio": 0.02,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.8,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\queryset.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 12,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\sites\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 55,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\blocks.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 438,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1321,
          "ai_signals": []
        },
        {
          "name": "target_model",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4821,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "widget",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 33,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3508,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 8.67,
        "function_length_stddev": 6.66,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 40,
        "comment_ratio": 0.1489,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 7.6,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.075,
        "structural_uniformity": 0.2317,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.42,
        "mechanical": 79.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_compare_revisions_view.py",
      "language": "python",
      "line_count": 168,
      "token_estimate": 1571,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 70,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 71,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 73,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 75,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4365,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_compare_revisions_earliest",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions_latest",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "test_compare_revisions_live",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "test_comparison_as_superuser",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0865,
          "ai_signals": []
        },
        {
          "name": "test_comparison_as_ordinary_user",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 154,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 156,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4365,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 15.33,
        "function_length_stddev": 8.7,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 165,
        "comment_ratio": 0.0179,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.63,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.054545,
        "structural_uniformity": 0.4324,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.76,
        "mechanical": 84.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_locking.py",
      "language": "python",
      "line_count": 762,
      "token_estimate": 6569,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "lock_snippet",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "refresh_snippet",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "set_permissions",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.454,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "refresh_snippet",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_get",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_already_locked",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_with_good_redirect",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_with_bad_redirect",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_bad_snippet",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_not_enabled_snippet",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_lock_post_bad_permissions",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_get",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_already_unlocked",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_with_good_redirect",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_with_bad_redirect",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_bad_snippet",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_not_enabled_snippet",
          "type": "function_definition",
          "line_start": 269,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_unlock_post_bad_permissions",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 277,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2984,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_unlock_post_own_snippet_with_bad_permissions",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 298,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2631,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_locked_by_another_user",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_locked_with_json_response",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 362,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2336,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_locked_by_self",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 399,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_locked_by_self_with_global_lock_enabled",
          "type": "decorated_definition",
          "line_start": 401,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.104,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_GLOBAL_EDIT_LOCK=True)"
          ]
        },
        {
          "name": "test_edit_get_locked_by_self",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 489,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 433,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 446,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 458,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 426,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_locked_by_self is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3227,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_edit_get_locked_by_another_user_has_unlock_permission",
          "type": "function_definition",
          "line_start": 491,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 502,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 521,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 491,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_locked_by_another_user_has_unlock_permission is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2915,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_edit_get_locked_by_another_user_no_unlock_permission",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 561,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 583,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 548,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_locked_by_another_user_no_unlock_permission is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2761,
          "ai_signals": []
        },
        {
          "name": "test_edit_get_unlocked_no_lock_permission",
          "type": "function_definition",
          "line_start": 610,
          "line_end": 666,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 617,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 641,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 610,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_unlocked_no_lock_permission is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2882,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_edit_get_unlocked_has_lock_permission",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 711,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 675,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 693,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 668,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_unlocked_has_lock_permission is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3426,
          "ai_signals": [
            "High anti-pattern density (0.68)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 726,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.454,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_when_locked_by_workflow",
          "type": "function_definition",
          "line_start": 730,
          "line_end": 761,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 733,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2134,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 35,
        "avg_function_length": 19.51,
        "function_length_stddev": 17.21,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 118,
        "code_lines": 644,
        "comment_ratio": 0.1549,
        "comment_what_ratio": 0.4019,
        "naming_avg_length": 6.69,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.037267,
        "structural_uniformity": 0.1181,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.19,
        "mechanical": 87.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_unschedule_view.py",
      "language": "python",
      "line_count": 152,
      "token_estimate": 1321,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "set_permissions",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 52,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5953,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_get_unschedule_view_with_publish_permissions",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5635,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_get_unschedule_view_bad_permissions",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_post_unschedule_view_with_publish_permissions",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_post_unschedule_view_bad_permissions",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        },
        {
          "name": "test_post_unschedule_view_with_next_url",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 18.71,
        "function_length_stddev": 7.45,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 136,
        "comment_ratio": 0.1053,
        "comment_what_ratio": 0.625,
        "naming_avg_length": 8.86,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.036765,
        "structural_uniformity": 0.6017,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.41,
        "mechanical": 87.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\widgets.py",
      "language": "python",
      "line_count": 82,
      "token_estimate": 690,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.209,
          "ai_signals": []
        },
        {
          "name": "get_chooser_modal_url",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.209,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 53,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.559,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 61,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 65,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.559,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.209,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 9.4,
        "function_length_stddev": 4.28,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 80,
        "comment_ratio": 0.0244,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.025,
        "structural_uniformity": 0.5449,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.05,
        "mechanical": 92.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\benchmark.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 263,
      "functions": [
        {
          "name": "test",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 28,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 28 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 36,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 36 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 13,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2917,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 36,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 44,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.62,
        "debug_artifacts": [
          "print line 28",
          "print line 36"
        ],
        "ai_smell_count": 3,
        "ai_smell_density": 0.068182,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 65.65,
        "mechanical": 65.65,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\demosite\\migrations\\0003_blogentrypagetag_fk_for_django_4.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 163,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.14,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\earlypage\\models.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 83,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 13,
        "comment_ratio": 0.1333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.88,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\i18n\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 177,
      "token_estimate": 1440,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 176,
        "comment_ratio": 0.0056,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\numberformat.py",
      "language": "python",
      "line_count": 135,
      "token_estimate": 1260,
      "functions": [
        {
          "name": "ignore_numberformat",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.036,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "patched_numberformat",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.036,
          "ai_signals": []
        },
        {
          "name": "patched_intcomma",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 68,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3053,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "patched_filesizeformat",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 85,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 78,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function patched_filesizeformat is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.211,
          "ai_signals": []
        },
        {
          "name": "patched_localize",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.036,
          "ai_signals": []
        },
        {
          "name": "patch_number_formats",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.036,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 16.67,
        "function_length_stddev": 13.66,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 119,
        "comment_ratio": 0.1185,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.14,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.02521,
        "structural_uniformity": 0.1802,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.7,
        "mechanical": 86.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\settings_ui.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 221,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 25,
        "comment_ratio": 0.1667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.13,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0005_multisectionrichtextsnippet_richtextsection.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 377,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 54,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.02,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0003_draftstatemodel.py",
      "language": "python",
      "line_count": 105,
      "token_estimate": 864,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 104,
        "comment_ratio": 0.0095,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0011_modelwithnullableparentalkey.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 296,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0019_fullfeaturedsnippet_translatable.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 256,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 35,
        "comment_ratio": 0.0278,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0027_featurecompletetoy_release_date.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 107,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0035_modelwithcustommanager.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 196,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.21,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0043_customimage_description.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 314,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0051_userapprovaltaskstate_userapprovaltask.py",
      "language": "python",
      "line_count": 60,
      "token_estimate": 473,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 59,
        "comment_ratio": 0.0167,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0059_nopromotepage.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 182,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\wagtail_hooks.py",
      "language": "python",
      "line_count": 462,
      "token_estimate": 3361,
      "functions": [
        {
          "name": "editor_css",
          "type": "decorated_definition",
          "line_start": 56,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"insert_global_admin_css\")"
          ]
        },
        {
          "name": "editor_js",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 63,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "block_googlebot",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 69,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 69,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "register_kittens_menu_item",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "register_custom_search_area",
          "type": "decorated_definition",
          "line_start": 104,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_search_area\")"
          ]
        },
        {
          "name": "polite_pages_only",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_explorer_page_queryset\")"
          ]
        },
        {
          "name": "hide_hidden_pages",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_explorer_page_queryset\")"
          ]
        },
        {
          "name": "register_quotation_feature",
          "type": "decorated_definition",
          "line_start": 133,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 140,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4058,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "register_intro_rule",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "register_panic_menu_item",
          "type": "decorated_definition",
          "line_start": 174,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_action_menu_item\")"
          ]
        },
        {
          "name": "register_none_menu_item",
          "type": "decorated_definition",
          "line_start": 179,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_action_menu_item\")"
          ]
        },
        {
          "name": "register_relax_menu_item",
          "type": "decorated_definition",
          "line_start": 189,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_page_action_menu\")"
          ]
        },
        {
          "name": "register_snippet_listing_button_item",
          "type": "decorated_definition",
          "line_start": 202,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 205,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4376,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"construct_snippet_listing_buttons\")"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "add_clippy_panel",
          "type": "decorated_definition",
          "line_start": 233,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_homepage_panels\")"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "add_broken_links_summary_item",
          "type": "decorated_definition",
          "line_start": 248,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_homepage_summary_items\")"
          ]
        },
        {
          "name": "register_viewsets",
          "type": "decorated_definition",
          "line_start": 253,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "register_toy_viewset",
          "type": "decorated_definition",
          "line_start": 262,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "get_history_template",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": []
        },
        {
          "name": "register_animated_advert_chooser_viewset",
          "type": "decorated_definition",
          "line_start": 437,
          "line_end": 439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "register_event_page_listing_viewset",
          "type": "decorated_definition",
          "line_start": 442,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "register_opera_viewset",
          "type": "decorated_definition",
          "line_start": 447,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "register_avatar_intercept_url",
          "type": "decorated_definition",
          "line_start": 452,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"get_avatar_url\")"
          ]
        },
        {
          "name": "register_advert_chooser_viewset",
          "type": "decorated_definition",
          "line_start": 459,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0876,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 32,
        "avg_function_length": 4.84,
        "function_length_stddev": 3.53,
        "import_count": 27,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 444,
        "comment_ratio": 0.039,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 9.68,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.011261,
        "structural_uniformity": 0.2713,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.5,
        "mechanical": 96.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\template_tests.py",
      "language": "python",
      "line_count": 89,
      "token_estimate": 843,
      "functions": [
        {
          "name": "assertBreadcrumbsItemsRendered",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 11,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 12,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 41,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 57,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 61,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 63,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 67,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 68,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 69,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 75,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 76,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 9,
              "description": "Function is 69 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 30 dynamic threshold)",
                "impact": "Function assertBreadcrumbsItemsRendered is 69 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "assertBreadcrumbsNotRendered",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 81,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 39.5,
        "function_length_stddev": 41.72,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 83,
        "comment_ratio": 0.0674,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.43,
        "debug_artifacts": [],
        "ai_smell_count": 20,
        "ai_smell_density": 0.240964,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 58.15,
        "mechanical": 58.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_migration_names.py",
      "language": "python",
      "line_count": 60,
      "token_estimate": 470,
      "functions": [
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2194,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.84)"
          ]
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2194,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.84)"
          ]
        },
        {
          "name": "test_multiple",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2194,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.84)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 14.33,
        "function_length_stddev": 2.31,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 60,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 13.1,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.8389,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.7,
        "mechanical": 98.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_comments.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 415,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1458,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "create_comment",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4958,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1458,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "test_deleting_old_revision_moves_comment_revision_created_forwards",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1458,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.73)"
          ]
        },
        {
          "name": "test_deleting_most_recent_revision_deletes_created_comments",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1458,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.73)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 5.6,
        "function_length_stddev": 1.52,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 41,
        "comment_ratio": 0.0682,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.04878,
        "structural_uniformity": 0.7292,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.2,
        "mechanical": 87.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_management_commands.py",
      "language": "python",
      "line_count": 893,
      "token_estimate": 7779,
      "functions": [
        {
          "name": "badly_delete_page",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "run_command",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_fixes_numchild",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_fixes_depth",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_detects_orphans",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_deletes_orphans",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_remove_path_holes",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "run_command",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_move_pages",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 167,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "run_command",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_set_url_paths",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_go_live_page_will_be_published",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 197,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_go_live_page_will_be_published is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1708,
          "ai_signals": []
        },
        {
          "name": "test_go_live_page_created_by_editor_will_be_published",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 255,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 249,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_go_live_page_created_by_editor_will_be_published is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.225,
          "ai_signals": []
        },
        {
          "name": "test_go_live_when_newer_revision_exists",
          "type": "function_definition",
          "line_start": 307,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_future_go_live_page_will_not_be_published",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_expired_page_will_be_unpublished",
          "type": "function_definition",
          "line_start": 364,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 364,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_expired_page_will_be_unpublished is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1897,
          "ai_signals": []
        },
        {
          "name": "test_future_expired_page_will_not_be_unpublished",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 437,
          "line_end": 439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_go_live_will_be_published",
          "type": "function_definition",
          "line_start": 441,
          "line_end": 485,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 441,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_go_live_will_be_published is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1799,
          "ai_signals": []
        },
        {
          "name": "test_go_live_created_by_editor_will_be_published",
          "type": "function_definition",
          "line_start": 487,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 493,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 487,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_go_live_created_by_editor_will_be_published is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.248,
          "ai_signals": []
        },
        {
          "name": "test_go_live_when_newer_revision_exists",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_future_go_live_will_not_be_published",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_expired_will_be_unpublished",
          "type": "function_definition",
          "line_start": 582,
          "line_end": 613,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_future_expired_will_not_be_unpublished",
          "type": "function_definition",
          "line_start": 615,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 634,
          "line_end": 635,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 637,
          "line_end": 648,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "assertRevisionNotExists",
          "type": "function_definition",
          "line_start": 650,
          "line_end": 651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "assertRevisionExists",
          "type": "function_definition",
          "line_start": 653,
          "line_end": 654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "run_command",
          "type": "function_definition",
          "line_start": 656,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_latest_revision_not_purged",
          "type": "function_definition",
          "line_start": 661,
          "line_end": 669,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_revisions_in_moderation_or_workflow_not_purged",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 694,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 674,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 674,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3938,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_revisions_with_approve_go_live_not_purged",
          "type": "function_definition",
          "line_start": 696,
          "line_end": 707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_purge_revisions_with_date_cutoff",
          "type": "function_definition",
          "line_start": 709,
          "line_end": 725,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_purge_revisions_protected_error",
          "type": "function_definition",
          "line_start": 727,
          "line_end": 737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 741,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "assertRevisionNotExists",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "assertRevisionNotExists",
          "type": "function_definition",
          "line_start": 770,
          "line_end": 772,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 794,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 780,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 791,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 792,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4522,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_purge_embeds",
          "type": "function_definition",
          "line_start": 796,
          "line_end": 806,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 812,
          "line_end": 854,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 824,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 845,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 812,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3463,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "test_log_entries_created_from_revisions",
          "type": "function_definition",
          "line_start": 856,
          "line_end": 883,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1022,
          "ai_signals": []
        },
        {
          "name": "test_command_doesnt_crash_for_revisions_without_page_model",
          "type": "function_definition",
          "line_start": 885,
          "line_end": 892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 885,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 885,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4522,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 43,
        "avg_function_length": 17.37,
        "function_length_stddev": 15.13,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 80,
        "code_lines": 813,
        "comment_ratio": 0.0896,
        "comment_what_ratio": 0.3816,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.02214,
        "structural_uniformity": 0.1292,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.58,
        "mechanical": 89.58,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_search.py",
      "language": "python",
      "line_count": 122,
      "token_estimate": 1041,
      "functions": [
        {
          "name": "test_converts_to_specific_page",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1233,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 51,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 52,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "reset_index",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 57,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 57,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "refresh_index",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 64,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 64,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_title",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 70,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_last_published_at_with_drafts_first",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 78,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 81,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_specific_queryset",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 90,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 90,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_specific_queryset_with_fields",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 94,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4733,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_item_no_results",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1233,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 7.56,
        "function_length_stddev": 4.16,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 116,
        "comment_ratio": 0.0492,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 8.18,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.12069,
        "structural_uniformity": 0.4499,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.22,
        "mechanical": 72.22,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_tests.py",
      "language": "python",
      "line_count": 545,
      "token_estimate": 5099,
      "functions": [
        {
          "name": "test_assert_tag_in_html",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_tag_in_html_with_extra_attrs",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_tag_in_template_script",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create_at",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 124,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_assert_can_create is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1341,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create_for_page_without_publish",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create_with_form_helpers",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 58,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 195,
              "description": "Function is 58 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 58 lines (> 37 dynamic threshold)",
                "impact": "Function test_assert_can_create_with_form_helpers is 58 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1361,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create_subpage_rules",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_can_create_validation_error",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_allowed_subpage_types",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_assert_allowed_parent_page_types",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_nested_form_data",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_streamfield",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_inline_formset",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_default_rich_text",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_rich_text_with_custom_features",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_rich_text_with_alternative_editor",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_save_with_incorrect_file_object_position",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 460,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2349,
          "ai_signals": []
        },
        {
          "name": "test_outputting_number_directly_is_disallowed",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 501,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 496,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2054,
          "ai_signals": []
        },
        {
          "name": "test_ignore_numberformat",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_outputting_number_via_intcomma",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 539,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        },
        {
          "name": "test_outputting_number_via_unlocalize",
          "type": "function_definition",
          "line_start": 541,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0758,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 20.52,
        "function_length_stddev": 15.48,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 526,
        "comment_ratio": 0.0349,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.007605,
        "structural_uniformity": 0.2457,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.14,
        "mechanical": 93.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\url_routing.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 144,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 3,
        "function_length_stddev": 1.41,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 10,
        "comment_ratio": 0.4118,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0004_capitalizeverbose.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 341,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 43,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.77,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0012_userprofile_theme.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 170,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.53,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\templatetags\\wagtailusers_tags.py",
      "language": "python",
      "line_count": 188,
      "token_estimate": 1950,
      "functions": [
        {
          "name": "normalize_permission_label",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 16,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 18,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 20,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 35,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 38,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 48,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 16,
              "description": "Function is 37 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 37 lines (> 30 dynamic threshold)",
                "impact": "Function normalize_permission_label is 37 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4276,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "format_permissions",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 125,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 117,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 118,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 121,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 127,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 127,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 132,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 132,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 142,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 147,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 171,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 63,
              "description": "Function is 125 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 125 lines (> 37 dynamic threshold)",
                "impact": "Function format_permissions is 125 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3856,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailusers/groups/includes/formatted_permissions.html\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 81,
        "function_length_stddev": 62.23,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 68,
        "code_lines": 120,
        "comment_ratio": 0.3617,
        "comment_what_ratio": 0.1562,
        "naming_avg_length": 7.81,
        "debug_artifacts": [],
        "ai_smell_count": 25,
        "ai_smell_density": 0.208333,
        "structural_uniformity": 0.2318,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 49.25,
        "mechanical": 49.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\groups.py",
      "language": "python",
      "line_count": 187,
      "token_estimate": 1389,
      "functions": [
        {
          "name": "get_permission_panel_classes",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 22,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5186,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_permission_panel_form_kwargs",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": []
        },
        {
          "name": "permission_panel_forms",
          "type": "decorated_definition",
          "line_start": 45,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 59,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "process_form",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 71,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4868,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": []
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 128,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": []
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1686,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 9.09,
        "function_length_stddev": 3.7,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 172,
        "comment_ratio": 0.0802,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 8.07,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.023256,
        "structural_uniformity": 0.593,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.5,
        "mechanical": 89.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\file.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 236,
      "functions": [
        {
          "name": "hash_filelike",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 18,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1207,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 29,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 31,
        "comment_ratio": 0.1389,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.65,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.032258,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.74,
        "mechanical": 64.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\urlpatterns.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 157,
      "functions": [
        {
          "name": "decorate_urlpatterns",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 6,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 14,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 15,
        "comment_ratio": 0.1667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.35,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.63,
        "mechanical": 68.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\copy_page.py",
      "language": "python",
      "line_count": 378,
      "token_estimate": 3587,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 11,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0242,
          "ai_signals": []
        },
        {
          "name": "generate_translation_key",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0242,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 75,
              "description": "Function is 34 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 34 lines (> 30 dynamic threshold)",
                "impact": "Function check is 34 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "_copy_page",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 30,
            "max_nesting_depth": 5,
            "parameter_count": 5,
            "line_count": 258,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 147,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 162,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 162,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 189,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 199,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 203,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 208,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 229,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 242,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 242,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 249,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 335,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 358,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 110,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 110 in _copy_page makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 110,
              "description": "Function is 258 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 258 lines (> 15 dynamic threshold)",
                "impact": "Function _copy_page is 258 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2277,
          "ai_signals": [
            "High anti-pattern density (0.58)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0242,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 67.6,
        "function_length_stddev": 107.02,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 46,
        "code_lines": 332,
        "comment_ratio": 0.1217,
        "comment_what_ratio": 0.1212,
        "naming_avg_length": 8.41,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.048193,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 49.05,
        "mechanical": 49.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\unpublish_page.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 521,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0807,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 39,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4307,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_commit_unpublish",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0807,
          "ai_signals": []
        },
        {
          "name": "_after_unpublish",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 49,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4307,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0807,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 9.6,
        "function_length_stddev": 5.73,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 66,
        "comment_ratio": 0.0571,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.15,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.030303,
        "structural_uniformity": 0.4034,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.42,
        "mechanical": 87.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\convert_alias.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 273,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 24,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 26,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7,
        "function_length_stddev": 7.07,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 31,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.79,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.064516,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.37,
        "mechanical": 82.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\unpublish.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 287,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 31,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4793,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 8,
        "function_length_stddev": 2.83,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.81,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.027778,
        "structural_uniformity": 0.6464,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.56,
        "mechanical": 91.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\checks.py",
      "language": "python",
      "line_count": 273,
      "token_estimate": 2336,
      "functions": [
        {
          "name": "css_install_check",
          "type": "decorated_definition",
          "line_start": 6,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.142,
          "ai_signals": [],
          "decorators": [
            "register(\"staticfiles\")"
          ]
        },
        {
          "name": "base_form_class_check",
          "type": "decorated_definition",
          "line_start": 36,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 43,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2942,
          "ai_signals": [],
          "decorators": [
            "register(Tags.admin)"
          ]
        },
        {
          "name": "get_form_class_check",
          "type": "decorated_definition",
          "line_start": 61,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 68,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2878,
          "ai_signals": [],
          "decorators": [
            "register(Tags.admin)"
          ]
        },
        {
          "name": "inline_panel_model_panels_check",
          "type": "decorated_definition",
          "line_start": 87,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 94,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 95,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 95,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 99,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 100,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.492,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register(\"panels\")"
          ]
        },
        {
          "name": "check_panels_in_model",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 105,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 105,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 115,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 120,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 122,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 139,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 105,
              "description": "Function is 62 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 30 dynamic threshold)",
                "impact": "Function check_panels_in_model is 62 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.492,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "wagtail_admin_base_url_check",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.142,
          "ai_signals": [],
          "decorators": [
            "register(\"wagtailadmin_base_url\")"
          ]
        },
        {
          "name": "file_overwrite_check",
          "type": "decorated_definition",
          "line_start": 189,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 189,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function file_overwrite_check is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2234,
          "ai_signals": [],
          "decorators": [
            "register(\"file_overwrite\")"
          ]
        },
        {
          "name": "datetime_format_check",
          "type": "decorated_definition",
          "line_start": 234,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 250,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 266,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 234,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function datetime_format_check is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.492,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register(\"datetime_format\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 31.62,
        "function_length_stddev": 15.5,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 255,
        "comment_ratio": 0.0659,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 19,
        "ai_smell_density": 0.07451,
        "structural_uniformity": 0.5099,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.89,
        "mechanical": 70.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\collections.py",
      "language": "python",
      "line_count": 378,
      "token_estimate": 3422,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "create_option",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "_get_disabled_queryset",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "_set_disabled_queryset",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "_set_queryset",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "label_from_instance",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 88,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3864,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean_parent",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 193,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 194,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 195,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 226,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 193,
              "description": "Function is 34 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 34 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 34 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3864,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "decorated_definition",
          "line_start": 249,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 265,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 266,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 280,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 249,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function save is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.328,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "as_admin_panel",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0364,
          "ai_signals": []
        },
        {
          "name": "collection_member_permission_formset_factory",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 306,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 311,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 315,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 316,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 320,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 324,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 325,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 325,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 327,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 338,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 340,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 354,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 305,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function collection_member_permission_formset_factory is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3864,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 16.81,
        "function_length_stddev": 17.78,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 53,
        "code_lines": 325,
        "comment_ratio": 0.1402,
        "comment_what_ratio": 0.1818,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.073846,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.78,
        "mechanical": 74.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\workflows.py",
      "language": "python",
      "line_count": 319,
      "token_estimate": 3000,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "is_searching",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "task_model",
          "type": "decorated_definition",
          "line_start": 58,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 59,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 59,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "specific_task_model_selected",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 112,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2548,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "label_from_instance",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 148,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 149,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_errors_by_id",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 160,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_with_errors",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0881,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 192,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 194,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 213,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2177,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 242,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2723,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "get_task_form_class",
          "type": "function_definition",
          "line_start": 265,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 282,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2088,
          "ai_signals": []
        },
        {
          "name": "get_workflow_edit_handler",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 313,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 318,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 318,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 296,
              "description": "Function is 23 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 23 lines (> 22 dynamic threshold)",
                "impact": "Function get_workflow_edit_handler is 23 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 15.53,
        "function_length_stddev": 9.36,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 45,
        "code_lines": 274,
        "comment_ratio": 0.1411,
        "comment_what_ratio": 0.0435,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.058394,
        "structural_uniformity": 0.3971,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.84,
        "mechanical": 78.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0002_admin.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 215,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 34,
        "comment_ratio": 0.0286,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.11,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\navigation.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 153,
      "functions": [
        {
          "name": "get_site_for_user",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0037,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 16,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.2,
        "mechanical": 90.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\inline_panel.py",
      "language": "python",
      "line_count": 209,
      "token_estimate": 1900,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 8,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 23,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 35,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 39,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "panel_definitions",
          "type": "decorated_definition",
          "line_start": 54,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0374,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "child_edit_handler",
          "type": "decorated_definition",
          "line_start": 64,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 68,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 68,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 89,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1541,
          "ai_signals": []
        },
        {
          "name": "on_model_bound",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 105,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "classes",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0374,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 117,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 126,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 141,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 161,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 114,
              "description": "Function is 49 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 49 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_comparison",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 167,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 173,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 182,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 191,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 192,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 200,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "telepath_pack",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 208,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3874,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 14.5,
        "function_length_stddev": 14.02,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 196,
        "comment_ratio": 0.0622,
        "comment_what_ratio": 0.1538,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.112245,
        "structural_uniformity": 0.0334,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.73,
        "mechanical": 70.73,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\__init__.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 241,
      "functions": [
        {
          "name": "get_rich_text_editor_widget",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 4,
              "description": "Unused import: from wagtail.admin.rich_text.editors.draftail import DraftailRichTextArea",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'DraftailRichTextArea' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.rich_text.editors.draftail import DraftailRichTextArea",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 22,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 32,
        "comment_ratio": 0.0303,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.04,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.15,
        "mechanical": 91.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\editors\\draftail\\__init__.py",
      "language": "python",
      "line_count": 110,
      "token_estimate": 901,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 25,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2087,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "format_value",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 85,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 89,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 94,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3587,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0087,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 12.17,
        "function_length_stddev": 11.63,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 104,
        "comment_ratio": 0.0545,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.59,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.038462,
        "structural_uniformity": 0.0437,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.23,
        "mechanical": 85.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\avatar.stories.tsx",
      "language": "tsx",
      "line_count": 42,
      "token_estimate": 188,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 21,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 21,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "tsx_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: import React from 'react';",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'React' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import React from 'react';",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 5,
        "comment_lines": 0,
        "code_lines": 42,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.9,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.02381,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.05,
        "mechanical": 94.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\tabs\\tab_nav_link.stories.tsx",
      "language": "tsx",
      "line_count": 30,
      "token_estimate": 150,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 14,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 14,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "tsx_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: import React from 'react';",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'React' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: import React from 'react';",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 3,
        "comment_lines": 0,
        "code_lines": 30,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.57,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.033333,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.67,
        "mechanical": 91.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\api\\test_pages.py",
      "language": "python",
      "line_count": 2070,
      "token_estimate": 18802,
      "functions": [
        {
          "name": "get_total_page_count",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_page_id_list",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_homepage",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 59,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 59,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 59,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 59,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 52,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3914,
          "ai_signals": [
            "High anti-pattern density (0.90)"
          ]
        },
        {
          "name": "test_unpublished_pages_appear_in_list",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 131,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 131,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 131,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 131,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_private_pages_appear_in_list",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 144,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 144,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 144,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 144,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_in_non_content_language",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 149,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 149,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 160,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 160,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 160,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 160,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 170,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 172,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 172,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 172,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 172,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 182,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 182,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 182,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 182,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 184,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 203,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 204,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 204,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 204,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 204,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 206,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 227,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 227,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 227,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 227,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 229,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 234,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 234,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 234,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 234,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 236,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 241,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 241,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 241,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 241,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 243,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 248,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 248,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 248,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 248,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 246,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_all_fields is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields_then_remove_something",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 295,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 295,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 295,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 295,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 297,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 290,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_all_fields_then_remove_something is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_nested_fields",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 334,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 336,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 336,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 336,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 336,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 338,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_foreign_key",
          "type": "function_definition",
          "line_start": 344,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 347,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 349,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 349,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 349,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 349,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 351,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 363,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_parent",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 371,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 371,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 371,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 371,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 373,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_descendants",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 392,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 392,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 392,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 394,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_child_relation",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 407,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 407,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 407,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 407,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 409,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_ordering",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 418,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 422,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 422,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 422,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 422,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 426,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_tags",
          "type": "function_definition",
          "line_start": 439,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 441,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 441,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 441,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 441,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 443,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_translations",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 456,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 456,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 456,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 456,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 458,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_root",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 484,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 484,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 484,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 484,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_page_1",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 492,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 492,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 492,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 492,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_root",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 503,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 503,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 503,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 503,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_root_doesnt_give_error",
          "type": "function_definition",
          "line_start": 511,
          "line_end": 516,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 514,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 514,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 514,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 514,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "make_simple_page",
          "type": "function_definition",
          "line_start": 520,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_for_explorer_filter",
          "type": "function_definition",
          "line_start": 523,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 539,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 539,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 539,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 539,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 544,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 544,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 544,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 544,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_for_explorer_no_child_of",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 553,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 553,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 553,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 553,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_for_explorer_construct_explorer_page_queryset_ordering",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 570,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 570,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 570,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 570,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter",
          "type": "function_definition",
          "line_start": 577,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 579,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 579,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 579,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 579,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter_off",
          "type": "function_definition",
          "line_start": 584,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 586,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 586,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 586,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 586,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter_int",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 595,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 595,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 595,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 595,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter_int_off",
          "type": "function_definition",
          "line_start": 600,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 602,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 602,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 602,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 602,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter_invalid_integer",
          "type": "function_definition",
          "line_start": 609,
          "line_end": 614,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 611,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 611,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 611,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 611,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_children_filter_invalid_value",
          "type": "function_definition",
          "line_start": 616,
          "line_end": 621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 618,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 618,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 618,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 618,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type_filter_items_are_all_blog_entries",
          "type": "function_definition",
          "line_start": 625,
          "line_end": 635,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 627,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 627,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 627,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 627,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 629,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type_filter_multiple",
          "type": "function_definition",
          "line_start": 637,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 639,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 639,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 639,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 639,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 644,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_default",
          "type": "function_definition",
          "line_start": 666,
          "line_end": 676,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 670,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 670,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 670,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 670,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title",
          "type": "function_definition",
          "line_start": 678,
          "line_end": 688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 682,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 682,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 682,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 682,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_backwards",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 700,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 694,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 694,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 694,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 694,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_total_count",
          "type": "function_definition",
          "line_start": 702,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 706,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 707,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 707,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 707,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 707,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_total_count",
          "type": "function_definition",
          "line_start": 712,
          "line_end": 720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 717,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 717,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 717,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 717,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_max_none_gives_no_errors",
          "type": "decorated_definition",
          "line_start": 722,
          "line_end": 731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 727,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 728,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 728,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 728,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 728,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=None)"
          ]
        },
        {
          "name": "test_include_root",
          "type": "function_definition",
          "line_start": 733,
          "line_end": 739,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 735,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 735,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 735,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 735,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_include_root_false",
          "type": "function_definition",
          "line_start": 741,
          "line_end": 747,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 743,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 743,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 743,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 743,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 753,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 758,
          "line_end": 899,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 142,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 765,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 765,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 765,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 765,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 860,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 868,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 758,
              "description": "Function is 142 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 142 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 142 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2505,
          "ai_signals": []
        },
        {
          "name": "test_meta_parent_id_doesnt_show_root_page",
          "type": "function_definition",
          "line_start": 902,
          "line_end": 907,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 905,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 905,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 905,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 905,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_field_ordering",
          "type": "function_definition",
          "line_start": 909,
          "line_end": 935,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 915,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 915,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 915,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 915,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 919,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_status_draft",
          "type": "function_definition",
          "line_start": 937,
          "line_end": 948,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 942,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 942,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 942,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 942,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_status_live_draft",
          "type": "function_definition",
          "line_start": 950,
          "line_end": 961,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 955,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 955,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 955,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 955,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_status_scheduled",
          "type": "function_definition",
          "line_start": 963,
          "line_end": 976,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 970,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 970,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 970,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 970,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_status_expired",
          "type": "function_definition",
          "line_start": 978,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 984,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 984,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 984,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 984,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_children_for_parent",
          "type": "function_definition",
          "line_start": 992,
          "line_end": 1004,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 995,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 995,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 995,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 995,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_descendants",
          "type": "function_definition",
          "line_start": 1006,
          "line_end": 1018,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1009,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1009,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1009,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1009,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_ancestors",
          "type": "function_definition",
          "line_start": 1020,
          "line_end": 1034,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1023,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1023,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1023,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1023,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_alias_page",
          "type": "function_definition",
          "line_start": 1036,
          "line_end": 1075,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1046,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1046,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1046,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1046,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1036,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_alias_page is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 1079,
          "line_end": 1087,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1084,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1084,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1084,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1084,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_fields",
          "type": "function_definition",
          "line_start": 1089,
          "line_end": 1094,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1091,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1091,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1091,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1091,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_nested_fields",
          "type": "function_definition",
          "line_start": 1096,
          "line_end": 1103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1098,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1098,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1098,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1098,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_foreign_key",
          "type": "function_definition",
          "line_start": 1105,
          "line_end": 1122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1107,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1107,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1107,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1107,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1118,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1128,
          "line_end": 1129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_page_id_list",
          "type": "function_definition",
          "line_start": 1131,
          "line_end": 1132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_homepage",
          "type": "function_definition",
          "line_start": 1134,
          "line_end": 1135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1141,
          "line_end": 1144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "make_stream_page",
          "type": "function_definition",
          "line_start": 1146,
          "line_end": 1148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_can_fetch_streamfield_content",
          "type": "function_definition",
          "line_start": 1150,
          "line_end": 1167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1157,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1159,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1159,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1159,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1159,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_block",
          "type": "function_definition",
          "line_start": 1169,
          "line_end": 1178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1170,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1174,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1174,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1174,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1174,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1177,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1184,
          "line_end": 1187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_custom_admin_display_title_shown_on_detail_page",
          "type": "function_definition",
          "line_start": 1189,
          "line_end": 1195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1192,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1192,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1192,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1192,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_admin_display_title_shown_on_listing",
          "type": "function_definition",
          "line_start": 1197,
          "line_end": 1209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1200,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1200,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1200,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1200,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1215,
          "line_end": 1218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_copy_page",
          "type": "function_definition",
          "line_start": 1220,
          "line_end": 1230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1224,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1224,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1224,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1226,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_change_title",
          "type": "function_definition",
          "line_start": 1232,
          "line_end": 1240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1236,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1236,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1236,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1236,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1238,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_change_slug",
          "type": "function_definition",
          "line_start": 1242,
          "line_end": 1249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1246,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1246,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1246,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1246,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1248,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_with_exclude_fields_in_copy",
          "type": "function_definition",
          "line_start": 1251,
          "line_end": 1263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1255,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1255,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1255,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1255,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1258,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_destination",
          "type": "function_definition",
          "line_start": 1265,
          "line_end": 1274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1269,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1269,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1269,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1269,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1271,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_recursive",
          "type": "function_definition",
          "line_start": 1276,
          "line_end": 1289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1285,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1285,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1285,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1285,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1287,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_in_draft",
          "type": "function_definition",
          "line_start": 1291,
          "line_end": 1304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1300,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1300,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1300,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1300,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1302,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_without_publish_permissions_at_destination_with_keep_live_false",
          "type": "function_definition",
          "line_start": 1308,
          "line_end": 1330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1312,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1315,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1327,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1327,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1327,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1327,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_recursively_copy_into_self",
          "type": "function_definition",
          "line_start": 1332,
          "line_end": 1346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1342,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1342,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1342,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1342,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_without_create_permissions_at_destination",
          "type": "function_definition",
          "line_start": 1348,
          "line_end": 1368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1352,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1365,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1365,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1365,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_without_publish_permissions_at_destination_with_keep_live",
          "type": "function_definition",
          "line_start": 1370,
          "line_end": 1400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1374,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1377,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1392,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1392,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1392,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_respects_page_creation_rules",
          "type": "function_definition",
          "line_start": 1402,
          "line_end": 1410,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1407,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1407,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1407,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1407,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_page_slug_in_use",
          "type": "function_definition",
          "line_start": 1412,
          "line_end": 1429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1421,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1421,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1421,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1421,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1435,
          "line_end": 1448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1450,
          "line_end": 1453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_convert_alias",
          "type": "function_definition",
          "line_start": 1455,
          "line_end": 1482,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_convert_alias_not_alias",
          "type": "function_definition",
          "line_start": 1484,
          "line_end": 1489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1488,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1488,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1488,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1488,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_alias_bad_permission",
          "type": "function_definition",
          "line_start": 1491,
          "line_end": 1502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1496,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3696,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1508,
          "line_end": 1511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_delete_page",
          "type": "function_definition",
          "line_start": 1513,
          "line_end": 1518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_delete_page_bad_permissions",
          "type": "function_definition",
          "line_start": 1520,
          "line_end": 1540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1525,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1534,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1534,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1534,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1534,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1546,
          "line_end": 1549,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_publish_page",
          "type": "function_definition",
          "line_start": 1551,
          "line_end": 1567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_publish_insufficient_permissions",
          "type": "function_definition",
          "line_start": 1569,
          "line_end": 1585,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1573,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1576,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1582,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1582,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1582,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1582,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_alias_page",
          "type": "function_definition",
          "line_start": 1587,
          "line_end": 1603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1594,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1594,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1594,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1594,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1609,
          "line_end": 1612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_page",
          "type": "function_definition",
          "line_start": 1614,
          "line_end": 1621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_page_include_descendants",
          "type": "function_definition",
          "line_start": 1623,
          "line_end": 1639,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1638,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2838,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_unpublish_page_without_including_descendants",
          "type": "function_definition",
          "line_start": 1641,
          "line_end": 1654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_invalid_page_id",
          "type": "function_definition",
          "line_start": 1656,
          "line_end": 1658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_page_insufficient_permission",
          "type": "function_definition",
          "line_start": 1660,
          "line_end": 1675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1664,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1672,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1672,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1672,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1672,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1681,
          "line_end": 1684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_move_page",
          "type": "function_definition",
          "line_start": 1686,
          "line_end": 1688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_move_page_bad_permissions",
          "type": "function_definition",
          "line_start": 1690,
          "line_end": 1713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1695,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1704,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1704,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1704,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1704,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_move_page_without_destination_page_id",
          "type": "function_definition",
          "line_start": 1715,
          "line_end": 1720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1719,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1719,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1719,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1719,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1726,
          "line_end": 1732,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1734,
          "line_end": 1740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_copy_homepage_for_translation",
          "type": "function_definition",
          "line_start": 1742,
          "line_end": 1759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1746,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1746,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1746,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1746,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1748,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_childpage_without_parent",
          "type": "function_definition",
          "line_start": 1761,
          "line_end": 1766,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1765,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1765,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1765,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1765,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_childpage_with_copy_parents",
          "type": "function_definition",
          "line_start": 1768,
          "line_end": 1790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1773,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1773,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1773,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1773,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1775,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_for_translation_no_locale",
          "type": "function_definition",
          "line_start": 1792,
          "line_end": 1797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1796,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1796,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1796,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1796,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_for_translation_unknown_locale",
          "type": "function_definition",
          "line_start": 1799,
          "line_end": 1804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1803,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1803,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1803,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1803,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_translating_latest_non_draft_page_revision",
          "type": "function_definition",
          "line_start": 1806,
          "line_end": 1834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_translating_latest_draft_page_revision",
          "type": "function_definition",
          "line_start": 1836,
          "line_end": 1874,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1836,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_translating_latest_draft_page_revision is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1677,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1880,
          "line_end": 1883,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1885,
          "line_end": 1889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_create_alias",
          "type": "function_definition",
          "line_start": 1891,
          "line_end": 1920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1903,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1903,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1903,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1903,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1905,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_alias_recursive",
          "type": "function_definition",
          "line_start": 1922,
          "line_end": 1953,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1929,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1929,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1929,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1929,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 1931,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_alias_doesnt_copy_recursively_to_the_same_tree",
          "type": "function_definition",
          "line_start": 1955,
          "line_end": 1966,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1962,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1962,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1962,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1962,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_alias_without_publish_permissions",
          "type": "function_definition",
          "line_start": 1968,
          "line_end": 1991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1972,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1983,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1983,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1983,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1983,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1997,
          "line_end": 2007,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 2009,
          "line_end": 2016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_revert_to_page_revision",
          "type": "function_definition",
          "line_start": 2018,
          "line_end": 2028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.078,
          "ai_signals": []
        },
        {
          "name": "test_revert_to_page_revision_bad_permissions",
          "type": "function_definition",
          "line_start": 2030,
          "line_end": 2048,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2035,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2045,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2045,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2045,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2045,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_revert_to_page_revision_without_revision_id",
          "type": "function_definition",
          "line_start": 2050,
          "line_end": 2055,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2054,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2054,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2054,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2054,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_revert_to_page_revision_bad_revision_id",
          "type": "function_definition",
          "line_start": 2057,
          "line_end": 2064,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2063,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2063,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2063,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2063,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.428,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 131,
        "avg_function_length": 13.82,
        "function_length_stddev": 15.02,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 119,
        "code_lines": 1951,
        "comment_ratio": 0.0575,
        "comment_what_ratio": 0.3898,
        "naming_avg_length": 7.46,
        "debug_artifacts": [],
        "ai_smell_count": 447,
        "ai_smell_density": 0.229113,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.87,
        "mechanical": 72.87,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_bulk_actions\\test_bulk_action.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 226,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0891,
          "ai_signals": []
        },
        {
          "name": "test_bulk_action_invalid_action",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0891,
          "ai_signals": []
        },
        {
          "name": "test_bulk_action_invalid_model",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4391,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 8.33,
        "function_length_stddev": 4.62,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 34,
        "comment_ratio": 0.0286,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.09,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.058824,
        "structural_uniformity": 0.4457,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.29,
        "mechanical": 85.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_create_page.py",
      "language": "python",
      "line_count": 3245,
      "token_estimate": 29223,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_add_subpage",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_add_subpage_with_subpage_types",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_no_subpage_type_available_to_create",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 109,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3087,
          "ai_signals": []
        },
        {
          "name": "test_add_subpage_with_one_valid_subpage_type",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_add_subpage_bad_permissions",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 143,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3555,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_add_subpage_nonexistantparent",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_add_subpage_with_next_param",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 188,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 188,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 191,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 195,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 202,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 175,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_buttons_not_shown_when_workflow_disabled",
          "type": "decorated_definition",
          "line_start": 219,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_create_multipart",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 243,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3018,
          "ai_signals": []
        },
        {
          "name": "test_create_page_without_promote_tab",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 267,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3684,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_create_page_with_custom_tabs",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 284,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 288,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 292,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_page_with_non_model_field",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 306,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4189,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_create_simplepage_bad_permissions",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 314,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2557,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_page_with_is_creatable_false",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_page_when_can_create_at_returns_false",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 378,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2496,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_singleton_page_with_max_count",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 409,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2663,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_page_with_wrong_parent_page_types",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_page_with_wrong_subpage_types",
          "type": "function_definition",
          "line_start": 450,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_page_defined_before_admin_load",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 495,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 488,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3338,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_create_simplepage_post",
          "type": "function_definition",
          "line_start": 497,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_with_blank_title",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 546,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 568,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 532,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_post_with_blank_title is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4057,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "test_create_simplepage_post_invalid_with_json_response",
          "type": "function_definition",
          "line_start": 574,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 592,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2896,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_with_blank_content",
          "type": "function_definition",
          "line_start": 600,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_with_json_response",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 693,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 660,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 638,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_post_with_json_response is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2746,
          "ai_signals": []
        },
        {
          "name": "test_publish_simplepage_post_with_blank_content",
          "type": "function_definition",
          "line_start": 695,
          "line_end": 723,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 712,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2703,
          "ai_signals": []
        },
        {
          "name": "test_create_eventpage_post_with_blank_start_date",
          "type": "function_definition",
          "line_start": 725,
          "line_end": 772,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 725,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_eventpage_post_with_blank_start_date is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2225,
          "ai_signals": []
        },
        {
          "name": "test_required_asterisk_on_reshowing_form",
          "type": "function_definition",
          "line_start": 774,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 818,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 820,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 823,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 774,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_required_asterisk_on_reshowing_form is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4241,
          "ai_signals": [
            "High anti-pattern density (0.78)"
          ]
        },
        {
          "name": "test_cannot_publish_eventpage_post_with_blank_start_date",
          "type": "function_definition",
          "line_start": 826,
          "line_end": 895,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 865,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 887,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 826,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_cannot_publish_eventpage_post_with_blank_start_date is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2996,
          "ai_signals": []
        },
        {
          "name": "test_cannot_create_page_with_blank_required_date",
          "type": "function_definition",
          "line_start": 897,
          "line_end": 926,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 918,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2663,
          "ai_signals": []
        },
        {
          "name": "test_create_streampage_post_with_blank_body",
          "type": "function_definition",
          "line_start": 928,
          "line_end": 954,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_streampage_post_with_empty_blocks_in_body",
          "type": "function_definition",
          "line_start": 956,
          "line_end": 995,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 956,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_streampage_post_with_empty_blocks_in_body is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2371,
          "ai_signals": []
        },
        {
          "name": "test_cannot_publish_streampage_with_blank_body",
          "type": "function_definition",
          "line_start": 997,
          "line_end": 1029,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1020,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2557,
          "ai_signals": []
        },
        {
          "name": "test_cannot_publish_streampage_with_empty_blocks_in_body",
          "type": "function_definition",
          "line_start": 1031,
          "line_end": 1076,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1067,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1031,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_cannot_publish_streampage_with_empty_blocks_in_body is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3018,
          "ai_signals": []
        },
        {
          "name": "test_can_create_form_page_with_blank_fields_in_inline_children",
          "type": "function_definition",
          "line_start": 1078,
          "line_end": 1123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1086,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1094,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1095,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1078,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_can_create_form_page_with_blank_fields_in_inline_children is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.454,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_cannot_publish_form_page_with_blank_fields_in_inline_children",
          "type": "function_definition",
          "line_start": 1125,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1142,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4334,
          "ai_signals": [
            "High anti-pattern density (0.81)"
          ]
        },
        {
          "name": "test_can_create_page_with_less_than_min_inline_panels",
          "type": "function_definition",
          "line_start": 1163,
          "line_end": 1190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_cannot_publish_page_with_less_than_min_inline_panels",
          "type": "function_definition",
          "line_start": 1192,
          "line_end": 1210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_can_publish_page_with_enough_inline_panels",
          "type": "function_definition",
          "line_start": 1212,
          "line_end": 1244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_scheduled",
          "type": "function_definition",
          "line_start": 1246,
          "line_end": 1281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_scheduled_go_live_before_expiry",
          "type": "function_definition",
          "line_start": 1283,
          "line_end": 1332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1307,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1312,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1319,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1327,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1328,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1283,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_scheduled_go_live_before_expiry is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_simplepage_scheduled_expire_in_the_past",
          "type": "function_definition",
          "line_start": 1334,
          "line_end": 1375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1355,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1362,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1370,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1371,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1334,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_scheduled_expire_in_the_past is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_simplepage_post_publish",
          "type": "function_definition",
          "line_start": 1377,
          "line_end": 1427,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1377,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_post_publish is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2182,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_publish_scheduled",
          "type": "function_definition",
          "line_start": 1429,
          "line_end": 1468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1429,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_post_publish_scheduled is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2371,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_submit",
          "type": "function_definition",
          "line_start": 1470,
          "line_end": 1508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1470,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_simplepage_post_submit is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2394,
          "ai_signals": []
        },
        {
          "name": "test_create_simplepage_post_existing_slug",
          "type": "function_definition",
          "line_start": 1510,
          "line_end": 1545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1539,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2468,
          "ai_signals": []
        },
        {
          "name": "test_create_default_privacy_page_public",
          "type": "function_definition",
          "line_start": 1547,
          "line_end": 1566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_default_privacy_page_logged_in",
          "type": "decorated_definition",
          "line_start": 1568,
          "line_end": 1599,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"wagtail.test.testapp.models.SimplePage.get_default_privacy_setting\")"
          ]
        },
        {
          "name": "test_create_default_privacy_page_shared_password",
          "type": "decorated_definition",
          "line_start": 1601,
          "line_end": 1634,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"wagtail.test.testapp.models.SimplePage.get_default_privacy_setting\")"
          ]
        },
        {
          "name": "test_create_default_privacy_page_user_groups",
          "type": "decorated_definition",
          "line_start": 1636,
          "line_end": 1667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"wagtail.test.testapp.models.SimplePage.get_default_privacy_setting\")"
          ]
        },
        {
          "name": "test_create_nonexistantparent",
          "type": "function_definition",
          "line_start": 1669,
          "line_end": 1673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_nonpagetype",
          "type": "function_definition",
          "line_start": 1675,
          "line_end": 1682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_custom_validation",
          "type": "function_definition",
          "line_start": 1684,
          "line_end": 1723,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1698,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1684,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_validation is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3246,
          "ai_signals": []
        },
        {
          "name": "test_preview_on_create",
          "type": "function_definition",
          "line_start": 1725,
          "line_end": 1758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1741,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1749,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1753,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1754,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1755,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_with_custom_validation",
          "type": "function_definition",
          "line_start": 1760,
          "line_end": 1804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1776,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1795,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1803,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1760,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_with_custom_validation is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4607,
          "ai_signals": [
            "High anti-pattern density (0.89)"
          ]
        },
        {
          "name": "test_whitespace_titles",
          "type": "function_definition",
          "line_start": 1806,
          "line_end": 1824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1823,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3338,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_whitespace_titles_with_tab",
          "type": "function_definition",
          "line_start": 1826,
          "line_end": 1844,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1843,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3338,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_whitespace_titles_with_tab_in_seo_title",
          "type": "function_definition",
          "line_start": 1846,
          "line_end": 1867,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_whitespace_is_stripped_from_titles",
          "type": "function_definition",
          "line_start": 1869,
          "line_end": 1892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_long_slug",
          "type": "function_definition",
          "line_start": 1894,
          "line_end": 1918,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1915,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2896,
          "ai_signals": []
        },
        {
          "name": "test_title_field_attrs",
          "type": "function_definition",
          "line_start": 1920,
          "line_end": 1951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1934,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.259,
          "ai_signals": []
        },
        {
          "name": "test_before_create_page_hook",
          "type": "function_definition",
          "line_start": 1953,
          "line_end": 1970,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1970,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3441,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_before_create_page_hook_with_json_response",
          "type": "function_definition",
          "line_start": 1972,
          "line_end": 2016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1998,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2016,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1972,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_before_create_page_hook_with_json_response is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.383,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_before_create_page_hook_post",
          "type": "function_definition",
          "line_start": 2018,
          "line_end": 2044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2041,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2792,
          "ai_signals": []
        },
        {
          "name": "test_before_create_page_hook_post_with_json_response",
          "type": "function_definition",
          "line_start": 2046,
          "line_end": 2108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2078,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2105,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2046,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function test_before_create_page_hook_post_with_json_response is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3163,
          "ai_signals": []
        },
        {
          "name": "test_after_create_page_hook",
          "type": "function_definition",
          "line_start": 2110,
          "line_end": 2139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2136,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2663,
          "ai_signals": []
        },
        {
          "name": "test_after_create_page_hook_with_json_response",
          "type": "function_definition",
          "line_start": 2141,
          "line_end": 2203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2179,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2200,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2141,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function test_after_create_page_hook_with_json_response is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3163,
          "ai_signals": []
        },
        {
          "name": "test_after_create_page_hook_with_page_publish",
          "type": "function_definition",
          "line_start": 2205,
          "line_end": 2234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2231,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2663,
          "ai_signals": []
        },
        {
          "name": "test_after_publish_page",
          "type": "function_definition",
          "line_start": 2236,
          "line_end": 2264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2262,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2703,
          "ai_signals": []
        },
        {
          "name": "test_before_publish_page",
          "type": "function_definition",
          "line_start": 2266,
          "line_end": 2296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2292,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2625,
          "ai_signals": []
        },
        {
          "name": "test_display_moderation_button_by_default",
          "type": "function_definition",
          "line_start": 2298,
          "line_end": 2313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_hide_moderation_button",
          "type": "decorated_definition",
          "line_start": 2315,
          "line_end": 2329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_create_sets_locale_to_parent_locale",
          "type": "function_definition",
          "line_start": 2331,
          "line_end": 2349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2349,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3338,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_create_shows_status_side_panel_skeleton",
          "type": "function_definition",
          "line_start": 2351,
          "line_end": 2399,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2361,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2365,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2366,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2368,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2369,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2370,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2373,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2351,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_shows_status_side_panel_skeleton is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2405,
          "line_end": 2412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create_page_with_permissioned_field_panel",
          "type": "function_definition",
          "line_start": 2414,
          "line_end": 2440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2444,
          "line_end": 2473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_standard_subpage",
          "type": "function_definition",
          "line_start": 2475,
          "line_end": 2494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_business_subpage",
          "type": "function_definition",
          "line_start": 2496,
          "line_end": 2514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_business_child_subpage",
          "type": "function_definition",
          "line_start": 2516,
          "line_end": 2532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_cannot_add_invalid_subpage_type",
          "type": "function_definition",
          "line_start": 2534,
          "line_end": 2569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_not_prompted_for_page_type_when_only_one_choice",
          "type": "function_definition",
          "line_start": 2571,
          "line_end": 2582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_inline_panel_media",
          "type": "function_definition",
          "line_start": 2590,
          "line_end": 2609,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2599,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2609,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_inline_streamfield",
          "type": "function_definition",
          "line_start": 2617,
          "line_end": 2636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2630,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2631,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4996,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2647,
          "line_end": 2649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_publish_url",
          "type": "function_definition",
          "line_start": 2651,
          "line_end": 2672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2678,
          "line_end": 2680,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 2682,
          "line_end": 2715,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2721,
          "line_end": 2723,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 2725,
          "line_end": 2758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2769,
          "line_end": 2771,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 2773,
          "line_end": 2811,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2773,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_create is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2394,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2818,
          "line_end": 2824,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 2826,
          "line_end": 2840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 2842,
          "line_end": 2857,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_without_permission_to_add",
          "type": "function_definition",
          "line_start": 2859,
          "line_end": 2890,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2859,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2870,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2873,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4777,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2897,
          "line_end": 2900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 2902,
          "line_end": 2930,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_selected",
          "type": "function_definition",
          "line_start": 2932,
          "line_end": 2964,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 2966,
          "line_end": 2984,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2988,
          "line_end": 2993,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_comment_notifications_switched_on_by_default",
          "type": "function_definition",
          "line_start": 2995,
          "line_end": 3007,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_post_with_comment_notifications_switched_on",
          "type": "function_definition",
          "line_start": 3009,
          "line_end": 3036,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_post_with_comment_notifications_switched_off",
          "type": "function_definition",
          "line_start": 3038,
          "line_end": 3064,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3072,
          "line_end": 3077,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1496,
          "ai_signals": []
        },
        {
          "name": "test_comments_enabled_by_default",
          "type": "function_definition",
          "line_start": 3079,
          "line_end": 3093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3089,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.383,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_comments_disabled",
          "type": "decorated_definition",
          "line_start": 3095,
          "line_end": 3110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3106,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3684,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "test_new_comment_json",
          "type": "function_definition",
          "line_start": 3112,
          "line_end": 3161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3142,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3112,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_new_comment_json is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2896,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3165,
          "line_end": 3206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3165,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.233,
          "ai_signals": []
        },
        {
          "name": "test_sidebar_private",
          "type": "function_definition",
          "line_start": 3208,
          "line_end": 3225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3218,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3441,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_sidebar_public",
          "type": "function_definition",
          "line_start": 3227,
          "line_end": 3244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3237,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3441,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 112,
        "avg_function_length": 27,
        "function_length_stddev": 14.2,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 276,
        "code_lines": 2969,
        "comment_ratio": 0.0851,
        "comment_what_ratio": 0.274,
        "naming_avg_length": 7.49,
        "debug_artifacts": [],
        "ai_smell_count": 114,
        "ai_smell_density": 0.038397,
        "structural_uniformity": 0.4741,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.9,
        "mechanical": 84.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_page_usage.py",
      "language": "python",
      "line_count": 130,
      "token_estimate": 1272,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0901,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 37,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 57,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 60,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 64,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 32,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_simple is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_private_usage",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 79,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 84,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_editable_usage",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 103,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 114,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3315,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 118,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 125,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 21.6,
        "function_length_stddev": 11.87,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 128,
        "comment_ratio": 0.0154,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.45,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.117188,
        "structural_uniformity": 0.4507,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.02,
        "mechanical": 68.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_account_management.py",
      "language": "python",
      "line_count": 1213,
      "token_estimate": 11294,
      "functions": [
        {
          "name": "test_login_view",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 43,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_login_view_post",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.471,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_already_logged_in_redirect",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_logged_in_as_non_privileged_user_doesnt_redirect",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 109,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4581,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_logout",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_logout_redirect_with_custom_login_url",
          "type": "decorated_definition",
          "line_start": 127,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_LOGIN_URL=\"fallback\")"
          ]
        },
        {
          "name": "test_not_logged_in_redirect",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_not_logged_in_gives_403_to_ajax_requests",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_not_logged_in_redirect_default_settings",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_logged_in_no_permission_redirect",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_logged_in_no_permission_gives_403_to_ajax_requests",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "assertPanelActive",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 232,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 232,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "assertPanelNotActive",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 240,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 240,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "post_form",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_account_view",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 285,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 303,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 311,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 313,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 313,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 276,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_account_view is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_name_post",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_email_post",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_email_not_valid",
          "type": "function_definition",
          "line_start": 349,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 362,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4364,
          "ai_signals": [
            "High anti-pattern density (0.53)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_with_email_management_disabled",
          "type": "decorated_definition",
          "line_start": 369,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 375,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_EMAIL_MANAGEMENT_ENABLED=False)"
          ]
        },
        {
          "name": "test_account_view_with_password_management_disabled",
          "type": "decorated_definition",
          "line_start": 383,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 389,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_PASSWORD_MANAGEMENT_ENABLED=False)"
          ]
        },
        {
          "name": "test_change_password_view_disabled",
          "type": "decorated_definition",
          "line_start": 393,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_PASSWORD_MANAGEMENT_ENABLED=False)"
          ]
        },
        {
          "name": "test_change_password",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_password_whitespaced",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_password_post_password_mismatch",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 460,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 444,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 444,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 444,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 445,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_ignore_change_password_if_only_old_password_supplied",
          "type": "function_definition",
          "line_start": 462,
          "line_end": 476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_notifications",
          "type": "function_definition",
          "line_start": 478,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 492,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 492,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5704,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_language_preferences",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_unset_language_preferences",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_available_admin_languages_with_permitted_languages",
          "type": "decorated_definition",
          "line_start": 545,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_PERMITTED_LANGUAGES=[(\"en\", \"English\"), (\"es\", \"Spanish\")]\n    )"
          ]
        },
        {
          "name": "test_available_admin_languages_by_default",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 556,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_default_language_follows_server_setting",
          "type": "decorated_definition",
          "line_start": 558,
          "line_end": 567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 559,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 559,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 562,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 567,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 567,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"id\")"
          ]
        },
        {
          "name": "test_not_show_options_if_only_one_language_is_permitted",
          "type": "decorated_definition",
          "line_start": 569,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_PERMITTED_LANGUAGES=[(\"en\", \"English\")])"
          ]
        },
        {
          "name": "test_change_current_time_zone",
          "type": "decorated_definition",
          "line_start": 574,
          "line_end": 589,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")"
          ]
        },
        {
          "name": "test_unset_current_time_zone",
          "type": "decorated_definition",
          "line_start": 591,
          "line_end": 606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")"
          ]
        },
        {
          "name": "test_available_admin_time_zones_with_permitted_time_zones",
          "type": "decorated_definition",
          "line_start": 608,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")",
            "override_settings(\n        WAGTAIL_USER_TIME_ZONES=[\"Africa/Addis_Ababa\", \"America/Argentina/Buenos_Aires\"]\n    )"
          ]
        },
        {
          "name": "test_available_admin_time_zones_by_default",
          "type": "decorated_definition",
          "line_start": 618,
          "line_end": 639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 627,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 637,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 637,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")"
          ]
        },
        {
          "name": "test_not_show_options_if_only_one_time_zone_is_permitted",
          "type": "decorated_definition",
          "line_start": 641,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")",
            "override_settings(WAGTAIL_USER_TIME_ZONES=[\"Europe/London\"])"
          ]
        },
        {
          "name": "test_not_show_options_if_timezone_support_disabled",
          "type": "decorated_definition",
          "line_start": 647,
          "line_end": 650,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipIf(settings.USE_TZ, \"Timezone support is enabled\")"
          ]
        },
        {
          "name": "test_doesnt_render_locale_panel_when_only_one_timezone_and_one_locale_permitted",
          "type": "decorated_definition",
          "line_start": 652,
          "line_end": 661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ],
          "decorators": [
            "unittest.skipUnless(settings.USE_TZ, \"Timezone support is disabled\")",
            "override_settings(\n        WAGTAIL_USER_TIME_ZONES=[\"Europe/London\"],\n        WAGTAILADMIN_PERMITTED_LANGUAGES=[(\"en\", \"English\")],\n    )"
          ]
        },
        {
          "name": "test_change_theme_post",
          "type": "function_definition",
          "line_start": 663,
          "line_end": 676,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_contrast_post",
          "type": "function_definition",
          "line_start": 678,
          "line_end": 691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_density_post",
          "type": "function_definition",
          "line_start": 693,
          "line_end": 706,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_sensitive_post_parameters",
          "type": "function_definition",
          "line_start": 708,
          "line_end": 713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_change_keyboard_shortcut_preference",
          "type": "function_definition",
          "line_start": 715,
          "line_end": 730,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 726,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 726,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 734,
          "line_end": 737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "create_image_file",
          "type": "function_definition",
          "line_start": 739,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 750,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_full_doc_in_prompt",
              "severity": "medium",
              "line": 753,
              "description": "Entire document sent in prompt when summary would suffice -- wastes tokens and money",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_full_doc_in_prompt",
              "severity": "medium",
              "line": 753,
              "description": "Entire document sent when summary or relevant section would suffice -- wastes tokens",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_account_view",
          "type": "function_definition",
          "line_start": 756,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_set_custom_avatar_stores_and_get_custom_avatar",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_user_upload_another_image_removes_previous_one",
          "type": "function_definition",
          "line_start": 780,
          "line_end": 804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_no_value_preserves_current_avatar",
          "type": "function_definition",
          "line_start": 806,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 806,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 806,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_clear_removes_current_avatar",
          "type": "function_definition",
          "line_start": 825,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_avatar_resize_large_image",
          "type": "function_definition",
          "line_start": 842,
          "line_end": 851,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_avatar_no_resize_small_image",
          "type": "function_definition",
          "line_start": 853,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_avatar_resize_width_greater_than_height",
          "type": "function_definition",
          "line_start": 862,
          "line_end": 873,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_avatar_resize_height_greater_than_width",
          "type": "function_definition",
          "line_start": 875,
          "line_end": 886,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_avatar_preserves_original_format",
          "type": "function_definition",
          "line_start": 888,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 888,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 888,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 912,
          "line_end": 919,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 917,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_notification_preferences_panel_reduced_for_non_moderators",
          "type": "function_definition",
          "line_start": 921,
          "line_end": 942,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 930,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 930,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 930,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 931,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 952,
          "line_end": 964,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 962,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_notification_preferences_not_rendered_for_admin_only_users",
          "type": "function_definition",
          "line_start": 966,
          "line_end": 971,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 979,
          "line_end": 983,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_view",
          "type": "function_definition",
          "line_start": 985,
          "line_end": 996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 995,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5439,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_view_post",
          "type": "function_definition",
          "line_start": 998,
          "line_end": 1015,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_view_post_unknown_email",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1031,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_view_post_invalid_email",
          "type": "function_definition",
          "line_start": 1033,
          "line_end": 1053,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1047,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1049,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5855,
          "ai_signals": [
            "High anti-pattern density (0.95)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "setup_password_reset_confirm_tests",
          "type": "function_definition",
          "line_start": 1055,
          "line_end": 1082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 1057,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1060,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1060,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 1067,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_confirm_view_invalid_link",
          "type": "function_definition",
          "line_start": 1084,
          "line_end": 1108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1101,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1103,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5322,
          "ai_signals": [
            "High anti-pattern density (0.80)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_confirm_view",
          "type": "function_definition",
          "line_start": 1110,
          "line_end": 1125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1124,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.471,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_confirm_view_post",
          "type": "function_definition",
          "line_start": 1127,
          "line_end": 1152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1149,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1149,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5214,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_confirm_view_post_password_mismatch",
          "type": "function_definition",
          "line_start": 1154,
          "line_end": 1186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1175,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1178,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1183,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1183,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_done_view",
          "type": "function_definition",
          "line_start": 1188,
          "line_end": 1199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1198,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5439,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        },
        {
          "name": "test_password_reset_complete_view",
          "type": "function_definition",
          "line_start": 1201,
          "line_end": 1212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1211,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5439,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.78)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 73,
        "avg_function_length": 14.73,
        "function_length_stddev": 7.57,
        "import_count": 22,
        "export_count": 0,
        "comment_lines": 244,
        "code_lines": 969,
        "comment_ratio": 0.2012,
        "comment_what_ratio": 0.7752,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 64,
        "ai_smell_density": 0.066047,
        "structural_uniformity": 0.4858,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.38,
        "mechanical": 81.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_compare.py",
      "language": "python",
      "line_count": 1725,
      "token_estimate": 15301,
      "functions": [
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 35,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4085,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_escapes_value",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_from_none_to_value_only_shows_addition",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_from_value_to_none_only_shows_deletion",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_has_changed_html",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_escapes_value",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 195,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2522,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_add_block",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_delete_block",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_edit_block",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_has_changed_richtext",
          "type": "function_definition",
          "line_start": 330,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_escapes_value_on_change",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_escapes_value_on_addition",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_escapes_value_on_deletion",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_richtext_strips_tags_on_change",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_richtext_strips_tags_on_addition",
          "type": "function_definition",
          "line_start": 498,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_richtext_strips_tags_on_deletion",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 564,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_raw_html_escapes_value_on_change",
          "type": "function_definition",
          "line_start": 566,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_raw_html_escapes_value_on_addition",
          "type": "function_definition",
          "line_start": 598,
          "line_end": 629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_htmldiff_raw_html_escapes_value_on_deletion",
          "type": "function_definition",
          "line_start": 631,
          "line_end": 662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_compare_structblock",
          "type": "function_definition",
          "line_start": 664,
          "line_end": 697,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_compare_listblock",
          "type": "function_definition",
          "line_start": 699,
          "line_end": 767,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 699,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_compare_listblock is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.19,
          "ai_signals": []
        },
        {
          "name": "test_compare_listblock_old_format",
          "type": "function_definition",
          "line_start": 769,
          "line_end": 834,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 806,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 769,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_compare_listblock_old_format is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2454,
          "ai_signals": []
        },
        {
          "name": "test_compare_nested_streamblock_uses_comparison_class",
          "type": "function_definition",
          "line_start": 836,
          "line_end": 879,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 836,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_compare_nested_streamblock_uses_comparison_class is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2188,
          "ai_signals": []
        },
        {
          "name": "test_compare_imagechooserblock",
          "type": "function_definition",
          "line_start": 881,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 882,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 882,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 914,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 881,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_compare_imagechooserblock is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4808,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ]
        },
        {
          "name": "test_streamblock_comparison_htmlvalue",
          "type": "function_definition",
          "line_start": 927,
          "line_end": 955,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 947,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.26,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 961,
          "line_end": 973,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 970,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4085,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 975,
          "line_end": 987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_from_none_to_value_only_shows_addition",
          "type": "function_definition",
          "line_start": 989,
          "line_end": 998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_from_value_to_none_only_shows_deletion",
          "type": "function_definition",
          "line_start": 1000,
          "line_end": 1009,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 1015,
          "line_end": 1031,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1017,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1018,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1021,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1022,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1028,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4893,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 1033,
          "line_end": 1049,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1035,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1036,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1039,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1040,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4893,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1056,
          "line_end": 1059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 1061,
          "line_end": 1081,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1078,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.306,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 1083,
          "line_end": 1106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1112,
          "line_end": 1122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1114,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1114,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4893,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 1124,
          "line_end": 1136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4085,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 1138,
          "line_end": 1150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1158,
          "line_end": 1171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 1173,
          "line_end": 1187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1184,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3726,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 1189,
          "line_end": 1203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 1210,
          "line_end": 1260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1248,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1210,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_hasnt_changed is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2766,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 1262,
          "line_end": 1321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1262,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_has_changed is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.256,
          "ai_signals": []
        },
        {
          "name": "test_has_changed_with_same_id",
          "type": "function_definition",
          "line_start": 1323,
          "line_end": 1384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1372,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1323,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_has_changed_with_same_id is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2522,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed_with_different_id",
          "type": "function_definition",
          "line_start": 1386,
          "line_end": 1437,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1425,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1386,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_hasnt_changed_with_different_id is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2739,
          "ai_signals": []
        },
        {
          "name": "test_panel_label_as_field_label",
          "type": "function_definition",
          "line_start": 1439,
          "line_end": 1461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1439,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1440,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1458,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1461,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4893,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_same_object",
          "type": "function_definition",
          "line_start": 1468,
          "line_end": 1499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_different_object",
          "type": "function_definition",
          "line_start": 1501,
          "line_end": 1532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_moved_object",
          "type": "function_definition",
          "line_start": 1534,
          "line_end": 1567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_addition",
          "type": "function_definition",
          "line_start": 1569,
          "line_end": 1595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_deletion",
          "type": "function_definition",
          "line_start": 1597,
          "line_end": 1623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1393,
          "ai_signals": []
        },
        {
          "name": "test_has_changed_with_same_id",
          "type": "function_definition",
          "line_start": 1632,
          "line_end": 1683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1671,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1632,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_has_changed_with_same_id is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2739,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed_with_different_id",
          "type": "function_definition",
          "line_start": 1685,
          "line_end": 1724,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1712,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1685,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_hasnt_changed_with_different_id is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3143,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 57,
        "avg_function_length": 27.75,
        "function_length_stddev": 15.36,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 454,
        "code_lines": 1271,
        "comment_ratio": 0.2632,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 42,
        "ai_smell_density": 0.033045,
        "structural_uniformity": 0.4465,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.26,
        "mechanical": 86.26,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_forms.py",
      "language": "python",
      "line_count": 377,
      "token_estimate": 3222,
      "functions": [
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_extra_fields",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_extra_fields",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_defer_required_fields",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_deferred_validation_property",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 114,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 75,
              "description": "Function is 114 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 114 lines (> 37 dynamic threshold)",
                "impact": "Function test_deferred_validation_property is 114 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0807,
          "ai_signals": []
        },
        {
          "name": "test_get_field_updates_for_resave_on_create",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_get_field_updates_for_resave_on_update",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "test_get_field_updates_for_resave_on_update_when_deleting_child",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 262,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_field_updates_for_resave_on_update_when_deleting_child is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1333,
          "ai_signals": []
        },
        {
          "name": "test_get_field_updates_for_resave_with_nested_inline_panel",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 305,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_field_updates_for_resave_with_nested_inline_panel is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0986,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 36.56,
        "function_length_stddev": 36.57,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 373,
        "comment_ratio": 0.0106,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 8.26,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.008043,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.41,
        "mechanical": 89.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_page_chooser.py",
      "language": "python",
      "line_count": 1698,
      "token_estimate": 17486,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 37,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_queryset_hook",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 51,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 52,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 53,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_chooser_view",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 67,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 68,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 68,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 68,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 72,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 75,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 77,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(USE_THOUSAND_SEPARATOR=True)"
          ]
        },
        {
          "name": "test_multiple_chooser_view_without_thousand_separator",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 94,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 99,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(USE_THOUSAND_SEPARATOR=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_cannot_choose_root_by_default",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_can_choose_root",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get_invalid",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 141,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_invalid",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_page_type",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 175,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 176,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 178,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 178,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 146,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_with_page_type is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_url_extended_page_type",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 210,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 212,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 212,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_blank_page_type",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 221,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_multiple_page_types",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 237,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 239,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 242,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 242,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_multiple_specific_page_types_display_warning",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 268,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 271,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 271,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_unknown_page_type",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_bad_page_type",
          "type": "function_definition",
          "line_start": 285,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_invalid_page_type",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_admin_display_title",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 297,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 299,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 299,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_parent_with_admin_display_title",
          "type": "function_definition",
          "line_start": 307,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 318,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 320,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 320,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 321,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 321,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_admin_display_title_breadcrumb",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 333,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 338,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 349,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 349,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setup_pagination_test_data",
          "type": "function_definition",
          "line_start": 351,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 353,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_basic",
          "type": "function_definition",
          "line_start": 361,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 366,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_another_page",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 372,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_invalid_page",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_pagination_out_of_range_page",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 406,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 410,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 410,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_partial_match",
          "type": "function_definition",
          "line_start": 420,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 423,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_result_uses_custom_admin_display_title",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 439,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3178,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_search_no_results",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_page_type",
          "type": "function_definition",
          "line_start": 447,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 461,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 462,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 464,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 464,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_blank_page_type",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 476,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_multiple_page_types",
          "type": "function_definition",
          "line_start": 480,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 496,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 498,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 501,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 501,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_unknown_page_type",
          "type": "function_definition",
          "line_start": 509,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_bad_page_type",
          "type": "function_definition",
          "line_start": 513,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_invalid_page_type",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_construct_queryset_hook",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 533,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 534,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "make_event_section",
          "type": "function_definition",
          "line_start": 556,
          "line_end": 576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get_best_root",
          "type": "function_definition",
          "line_start": 578,
          "line_end": 580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 580,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_type_filter",
          "type": "function_definition",
          "line_start": 582,
          "line_end": 583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_type_page",
          "type": "function_definition",
          "line_start": 585,
          "line_end": 588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_type_eventpage",
          "type": "function_definition",
          "line_start": 590,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_type_eventpage_two_indexes",
          "type": "function_definition",
          "line_start": 599,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_type_simple_page",
          "type": "function_definition",
          "line_start": 609,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_type_missing",
          "type": "function_definition",
          "line_start": 618,
          "line_end": 624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 628,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 633,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 642,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 644,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 647,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_prepopulated_form",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_create_link",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 671,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 665,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 665,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 665,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 665,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_without_text",
          "type": "function_definition",
          "line_start": 673,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 676,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 676,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 676,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 676,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_notice_changes_to_link_text",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 715,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 695,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 695,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 695,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 695,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 696,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 699,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 711,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 711,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 711,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 711,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 712,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 715,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_url",
          "type": "function_definition",
          "line_start": 717,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 725,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 725,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 725,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 725,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_allow_local_url",
          "type": "function_definition",
          "line_start": 731,
          "line_end": 744,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 739,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 739,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 739,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 739,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_to_internal_link",
          "type": "function_definition",
          "line_start": 746,
          "line_end": 757,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 754,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 754,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 754,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 754,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_link_with_query_parameters_to_internal_link",
          "type": "function_definition",
          "line_start": 759,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 767,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 767,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 767,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 767,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_relative_external_link_to_internal_link",
          "type": "function_definition",
          "line_start": 778,
          "line_end": 789,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 786,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 786,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 786,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 786,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_conversion_external_to_internal_link_when_disabled",
          "type": "decorated_definition",
          "line_start": 791,
          "line_end": 804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 799,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 799,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 799,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 799,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"\")"
          ]
        },
        {
          "name": "test_no_confirm_external_to_internal_link_when_exact",
          "type": "decorated_definition",
          "line_start": 806,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 814,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 814,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 814,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 814,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"exact\")"
          ]
        },
        {
          "name": "test_convert_external_link_to_internal_link_with_confirm_setting",
          "type": "decorated_definition",
          "line_start": 822,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 832,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 832,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 832,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 832,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"confirm\")"
          ]
        },
        {
          "name": "test_convert_external_to_internal_link",
          "type": "function_definition",
          "line_start": 845,
          "line_end": 862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 847,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 847,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 858,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 858,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 858,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 858,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_link_with_query_parameters_to_internal_link",
          "type": "function_definition",
          "line_start": 864,
          "line_end": 882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 872,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 872,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 872,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 872,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 880,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 880,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_relative_external_link_to_internal_link",
          "type": "function_definition",
          "line_start": 884,
          "line_end": 900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 892,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 892,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 892,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 892,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 894,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 894,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 898,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 898,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_link_to_internal_link_with_confirm_setting",
          "type": "decorated_definition",
          "line_start": 902,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 912,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 912,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 912,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 912,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 914,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 914,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"confirm\")"
          ]
        },
        {
          "name": "test_convert_external_to_internal_link",
          "type": "function_definition",
          "line_start": 928,
          "line_end": 945,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 929,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 929,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 930,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 930,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 932,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 932,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 941,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 941,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 941,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 941,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 944,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_to_internal_link_with_serve_path",
          "type": "function_definition",
          "line_start": 947,
          "line_end": 974,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 947,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 947,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 949,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 949,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 950,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 950,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 952,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 952,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 959,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 966,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 971,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 971,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 971,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 971,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 973,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_link_with_query_parameters_to_internal_link",
          "type": "function_definition",
          "line_start": 976,
          "line_end": 998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 977,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 977,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 978,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 978,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 980,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 980,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 989,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 989,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 989,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 989,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 997,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_external_link_with_query_parameters_to_internal_link_with_serve_path",
          "type": "function_definition",
          "line_start": 1000,
          "line_end": 1028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1000,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1000,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1004,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1004,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1005,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1005,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1007,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1007,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1013,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1018,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1018,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1018,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1018,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1025,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1027,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_relative_external_link_to_internal_link",
          "type": "function_definition",
          "line_start": 1030,
          "line_end": 1047,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1031,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1031,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1032,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1032,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1034,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1034,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1043,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1043,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1043,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1043,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1046,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_convert_relative_external_link_to_internal_link_with_serve_path",
          "type": "function_definition",
          "line_start": 1049,
          "line_end": 1067,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1049,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1049,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1051,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1051,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1052,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1052,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1054,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1054,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1059,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1064,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1064,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1064,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1064,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1066,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_conversion_external_to_internal_link_when_disabled_with_serve_path",
          "type": "decorated_definition",
          "line_start": 1069,
          "line_end": 1084,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1070,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1070,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1073,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1079,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1079,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1079,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1079,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"\")"
          ]
        },
        {
          "name": "test_no_confirm_external_to_internal_link_when_exact_with_serve_path",
          "type": "decorated_definition",
          "line_start": 1086,
          "line_end": 1100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1087,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1087,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1088,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1094,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1094,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1094,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1094,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"exact\")"
          ]
        },
        {
          "name": "test_convert_external_link_to_internal_link_with_confirm_setting",
          "type": "decorated_definition",
          "line_start": 1102,
          "line_end": 1120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1104,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1112,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1112,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1112,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1112,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1119,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_EXTERNAL_LINK_CONVERSION=\"confirm\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1142,
          "line_end": 1143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1145,
          "line_end": 1146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1148,
          "line_end": 1152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1154,
          "line_end": 1157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1157,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_prepopulated_form",
          "type": "function_definition",
          "line_start": 1159,
          "line_end": 1165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_create_link",
          "type": "function_definition",
          "line_start": 1167,
          "line_end": 1179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1174,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1174,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1174,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1174,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1175,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1179,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_without_text",
          "type": "function_definition",
          "line_start": 1181,
          "line_end": 1188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1183,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1183,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1183,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1183,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1184,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1188,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_notice_changes_to_link_text",
          "type": "function_definition",
          "line_start": 1190,
          "line_end": 1221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1201,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1201,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1201,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1201,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1202,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1205,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1217,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1217,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1217,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1217,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1218,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1221,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1225,
          "line_end": 1226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1228,
          "line_end": 1229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1231,
          "line_end": 1235,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1237,
          "line_end": 1240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1240,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_prepopulated_form",
          "type": "function_definition",
          "line_start": 1242,
          "line_end": 1246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_create_link",
          "type": "function_definition",
          "line_start": 1248,
          "line_end": 1260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1255,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1255,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1255,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1255,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1256,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1260,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_with_subject_and_body",
          "type": "function_definition",
          "line_start": 1262,
          "line_end": 1287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1272,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1272,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1272,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1272,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1273,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1281,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_with_subject_only",
          "type": "function_definition",
          "line_start": 1289,
          "line_end": 1310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1298,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1298,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1298,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1298,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1299,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1304,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_with_body_only",
          "type": "function_definition",
          "line_start": 1312,
          "line_end": 1333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1321,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1321,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1321,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1321,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1322,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1327,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_without_text",
          "type": "function_definition",
          "line_start": 1335,
          "line_end": 1344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1339,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1339,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1339,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1339,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1340,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1344,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_notice_changes_to_link_text",
          "type": "function_definition",
          "line_start": 1346,
          "line_end": 1377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1357,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1357,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1357,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1357,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1358,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1361,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1373,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1373,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1373,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1373,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1374,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1377,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1381,
          "line_end": 1382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1384,
          "line_end": 1385,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1387,
          "line_end": 1391,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1393,
          "line_end": 1396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1396,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_prepopulated_form",
          "type": "function_definition",
          "line_start": 1398,
          "line_end": 1402,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_create_link",
          "type": "function_definition",
          "line_start": 1404,
          "line_end": 1414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1411,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1411,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1411,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1411,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1412,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1414,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_link_without_text",
          "type": "function_definition",
          "line_start": 1416,
          "line_end": 1423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1418,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1418,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1418,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1418,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1419,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1423,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_notice_changes_to_link_text",
          "type": "function_definition",
          "line_start": 1425,
          "line_end": 1456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1436,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1436,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1436,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1436,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1437,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1440,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1452,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1452,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1452,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1452,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1453,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1456,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_phone_number_has_spaces",
          "type": "function_definition",
          "line_start": 1458,
          "line_end": 1468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1465,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1465,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1465,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1465,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "fal_image_url_not_validated",
              "severity": "high",
              "line": 1466,
              "description": "fal.ai output URL used without validation -- URL may be expired, empty, or malformed",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1468,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1474,
          "line_end": 1476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_can_choose_page",
          "type": "function_definition",
          "line_start": 1478,
          "line_end": 1481,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_user_no_permission",
          "type": "function_definition",
          "line_start": 1483,
          "line_end": 1490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1486,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1486,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_can_choose_root",
          "type": "function_definition",
          "line_start": 1492,
          "line_end": 1497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_with_can_not_choose_root",
          "type": "function_definition",
          "line_start": 1499,
          "line_end": 1504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_same_page",
          "type": "function_definition",
          "line_start": 1506,
          "line_end": 1515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_root",
          "type": "function_definition",
          "line_start": 1517,
          "line_end": 1527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_page_with_wrong_parent_types",
          "type": "function_definition",
          "line_start": 1529,
          "line_end": 1541,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_same_page_bulk",
          "type": "function_definition",
          "line_start": 1543,
          "line_end": 1553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_root_bulk",
          "type": "function_definition",
          "line_start": 1555,
          "line_end": 1566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_move_to_page_with_wrong_parent_types_bulk",
          "type": "function_definition",
          "line_start": 1568,
          "line_end": 1583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1592,
          "line_end": 1613,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1615,
          "line_end": 1618,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "get_choose_page_url",
          "type": "function_definition",
          "line_start": 1620,
          "line_end": 1625,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_present_in_root_view",
          "type": "function_definition",
          "line_start": 1627,
          "line_end": 1635,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1629,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1629,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 1637,
          "line_end": 1642,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1640,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1640,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_selector_without_translation",
          "type": "function_definition",
          "line_start": 1644,
          "line_end": 1649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1648,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1648,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_selector_with_active_locale",
          "type": "function_definition",
          "line_start": 1651,
          "line_end": 1667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1654,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1654,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 1669,
          "line_end": 1673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1672,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1672,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_query_params_preserved",
          "type": "function_definition",
          "line_start": 1675,
          "line_end": 1687,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1675,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1675,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1681,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1681,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_query_params_preserved_in_root_view",
          "type": "function_definition",
          "line_start": 1689,
          "line_end": 1697,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1689,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1689,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1693,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1693,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4178,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 131,
        "avg_function_length": 11.37,
        "function_length_stddev": 8.82,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 1429,
        "code_lines": 269,
        "comment_ratio": 0.8416,
        "comment_what_ratio": 0.114,
        "naming_avg_length": 7.4,
        "debug_artifacts": [],
        "ai_smell_count": 359,
        "ai_smell_density": 1.334572,
        "structural_uniformity": 0.2249,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.27,
        "mechanical": 74.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_templatetags.py",
      "language": "python",
      "line_count": 1224,
      "token_estimate": 11635,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_get_avatar_url_undefined",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_get_avatar_url_registered",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "mock.patch.dict(os.environ, {\"AVATAR_INTERCEPT\": \"True\"}, clear=True)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_use_gravatar_by_default",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_skip_gravatar_if_no_email",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_custom_gravatar_provider",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=\"https://robohash.org\")"
          ]
        },
        {
          "name": "test_disable_gravatar",
          "type": "decorated_definition",
          "line_start": 73,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_GRAVATAR_PROVIDER_URL=None)"
          ]
        },
        {
          "name": "test_uploaded_avatar",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_local_absolute_static",
          "type": "decorated_definition",
          "line_start": 88,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(STATIC_URL=\"/static/\")"
          ]
        },
        {
          "name": "test_local_absolute_static_baseurl",
          "type": "decorated_definition",
          "line_start": 97,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(\n        STATIC_URL=\"/static/\", WAGTAILADMIN_BASE_URL=\"http://localhost:8000\"\n    )"
          ]
        },
        {
          "name": "test_remote_absolute_static",
          "type": "decorated_definition",
          "line_start": 108,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(\n        STATIC_URL=\"https://s3.amazonaws.com/somebucket/static/\",\n        WAGTAILADMIN_BASE_URL=\"http://localhost:8000\",\n    )"
          ]
        },
        {
          "name": "test_version_hash",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_versioned_static",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 126,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 127,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_versioned_static_version_string",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 131,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 132,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 133,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 134,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.admin.staticfiles.static\")"
          ]
        },
        {
          "name": "test_versioned_static_absolute_path",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 137,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 138,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_versioned_static_url",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 141,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 142,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_timesince_simple",
          "type": "decorated_definition",
          "line_start": 147,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "freeze_time(\"2020-07-01 12:00:00+09:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_today_shows_time",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 178,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 179,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 186,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 188,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(not settings.USE_TZ, \"Test assumes timezone support is active\")",
            "freeze_time(\"2020-07-01 06:00:00+09:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_today_shows_time_without_tz",
          "type": "decorated_definition",
          "line_start": 198,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 205,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 206,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 213,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 215,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(settings.USE_TZ, \"Test assumes timezone support is disabled\")",
            "freeze_time(\"2020-07-01 06:00:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_before_midnight_shows_timeago",
          "type": "decorated_definition",
          "line_start": 219,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(not settings.USE_TZ, \"Test assumes timezone support is active\")",
            "freeze_time(\"2020-07-01 06:00:00+09:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_before_midnight_shows_timeago_without_tz",
          "type": "decorated_definition",
          "line_start": 232,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(settings.USE_TZ, \"Test assumes timezone support is disabled\")",
            "freeze_time(\"2020-07-01 06:00:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_before_today_shows_timeago",
          "type": "decorated_definition",
          "line_start": 243,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 252,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 254,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 265,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 274,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 279,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 243,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_timesince_last_update_before_today_shows_timeago is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(not settings.USE_TZ, \"Test assumes timezone support is active\")",
            "freeze_time(\"2020-07-01 12:00:00+09:00\")"
          ]
        },
        {
          "name": "test_timesince_last_update_before_today_shows_timeago_without_tz",
          "type": "decorated_definition",
          "line_start": 283,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 292,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 294,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 305,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 314,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 319,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 283,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_timesince_last_update_before_today_shows_timeago_without_tz is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "unittest.skipIf(settings.USE_TZ, \"Test assumes timezone support is disabled\")",
            "freeze_time(\"2020-07-01 12:00:00\")"
          ]
        },
        {
          "name": "test_human_readable_date",
          "type": "decorated_definition",
          "line_start": 323,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(USE_TZ=False)",
            "freeze_time(\"2020-07-01 12:00:00\")"
          ]
        },
        {
          "name": "test_human_readable_date_with_date_object",
          "type": "decorated_definition",
          "line_start": 342,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(USE_TZ=False)",
            "freeze_time(\"2020-07-01 12:00:00\")"
          ]
        },
        {
          "name": "test_human_readable_date_with_args",
          "type": "decorated_definition",
          "line_start": 361,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "freeze_time(\"2020-07-01 12:00:00\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 387,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 389,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_i18n_enabled",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_locale_label_from_id",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 400,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 402,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 405,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 409,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_block_component",
          "type": "function_definition",
          "line_start": 413,
          "line_end": 426,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_nested",
          "type": "function_definition",
          "line_start": 428,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_kwargs_with_filters",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_as_variable",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 479,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 483,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_syntax_error",
          "type": "decorated_definition",
          "line_start": 502,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(DEBUG=True)"
          ]
        },
        {
          "name": "test_with_variables",
          "type": "function_definition",
          "line_start": 514,
          "line_end": 531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_single_arg",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 547,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_multiple_args",
          "type": "function_definition",
          "line_start": 549,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_falsy_args",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 579,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_args_with_extra_whitespace",
          "type": "function_definition",
          "line_start": 581,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_nested_lists",
          "type": "function_definition",
          "line_start": 603,
          "line_end": 623,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 627,
          "line_end": 637,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_classes_positional",
          "type": "function_definition",
          "line_start": 639,
          "line_end": 649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_with_classes_keyword",
          "type": "function_definition",
          "line_start": 651,
          "line_end": 661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_block_component_span_variations",
          "type": "function_definition",
          "line_start": 665,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 670,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 671,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 678,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_block_component_anchor_variations",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 688,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 689,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 697,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_render_as_fragment",
          "type": "function_definition",
          "line_start": 712,
          "line_end": 735,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 717,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 718,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 719,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 726,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 730,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_single_item",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 746,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_trailing_no_url",
          "type": "function_definition",
          "line_start": 756,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 758,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 759,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 760,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_not_is_expanded",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 784,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 767,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 768,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 769,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_is_expanded",
          "type": "function_definition",
          "line_start": 786,
          "line_end": 809,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 792,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 793,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 794,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_classname",
          "type": "function_definition",
          "line_start": 811,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 816,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.445,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_icon_name",
          "type": "function_definition",
          "line_start": 825,
          "line_end": 841,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 831,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 832,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 848,
          "line_end": 851,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_root_single_item",
          "type": "function_definition",
          "line_start": 853,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 859,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3816,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_url_name",
          "type": "function_definition",
          "line_start": 871,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 879,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 883,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 887,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 891,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_not_include_self",
          "type": "function_definition",
          "line_start": 900,
          "line_end": 914,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 907,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 908,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 909,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_not_is_expanded",
          "type": "function_definition",
          "line_start": 916,
          "line_end": 936,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 923,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 924,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 925,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 926,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_is_expanded",
          "type": "function_definition",
          "line_start": 938,
          "line_end": 959,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 945,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 946,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 947,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 948,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_querystring_value",
          "type": "function_definition",
          "line_start": 961,
          "line_end": 980,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 969,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 971,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 974,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 975,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_trailing_breadcrumb_title",
          "type": "function_definition",
          "line_start": 982,
          "line_end": 998,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 989,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 990,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 991,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 992,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 993,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_classname",
          "type": "function_definition",
          "line_start": 1000,
          "line_end": 1015,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1006,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3945,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_icon_name",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1037,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1024,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1025,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1026,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1041,
          "line_end": 1045,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_default_mode",
          "type": "function_definition",
          "line_start": 1047,
          "line_end": 1057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_dark_mode",
          "type": "function_definition",
          "line_start": 1059,
          "line_end": 1072,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_light_mode",
          "type": "function_definition",
          "line_start": 1074,
          "line_end": 1087,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "render_template",
          "type": "function_definition",
          "line_start": 1091,
          "line_end": 1107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1758,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_basic_usage_with_full_html",
          "type": "function_definition",
          "line_start": 1109,
          "line_end": 1150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1118,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1119,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1120,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1122,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1123,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1109,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic_usage_with_full_html is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_complex_usage_with_full_html",
          "type": "function_definition",
          "line_start": 1152,
          "line_end": 1201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1154,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1167,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1168,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1169,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1170,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1171,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1172,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1152,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_complex_usage_with_full_html is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5258,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_attrs_rendering",
          "type": "function_definition",
          "line_start": 1203,
          "line_end": 1223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1219,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1219,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5091,
          "ai_signals": [
            "High anti-pattern density (0.95)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 72,
        "avg_function_length": 14.9,
        "function_length_stddev": 9.61,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 696,
        "code_lines": 528,
        "comment_ratio": 0.5686,
        "comment_what_ratio": 0.5238,
        "naming_avg_length": 7.52,
        "debug_artifacts": [],
        "ai_smell_count": 105,
        "ai_smell_density": 0.198864,
        "structural_uniformity": 0.355,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.37,
        "mechanical": 73.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\tests.py",
      "language": "python",
      "line_count": 555,
      "token_estimate": 5562,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_accessible_skip_link_exists",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 34,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4551,
          "ai_signals": [
            "High anti-pattern density (0.67)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_admin_menu",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 53,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 69,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_dashboard_panels",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 82,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 82,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_summary_items",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_never_cache_header",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_nonascii_email",
          "type": "decorated_definition",
          "line_start": 106,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ],
          "decorators": [
            "unittest.skipIf(\n        settings.AUTH_USER_MODEL == \"emailuser.EmailUser\",\n        \"Only applicable to CustomUser\",\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_editor_css_hooks_on_add",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 127,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_editor_js_hooks_on_add",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 138,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 145,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_editor_css_hooks_on_edit",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_editor_js_hooks_on_edit",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 161,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_email",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 167,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 167,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_fallback_to_wagtailadmin_notification_from_email_setting",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 179,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 179,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_NOTIFICATION_FROM_EMAIL=\"anothertest@email.com\")"
          ]
        },
        {
          "name": "test_send_fallback_to_default_from_email_setting",
          "type": "decorated_definition",
          "line_start": 188,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 190,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 190,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ],
          "decorators": [
            "override_settings(DEFAULT_FROM_EMAIL=\"yetanothertest@email.com\")"
          ]
        },
        {
          "name": "test_send_default_from_email",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 200,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 200,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_html_email",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 218,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 218,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 227,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 227,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 230,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 230,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_pii_redaction",
              "severity": "high",
              "line": 238,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_pii_redaction",
              "severity": "high",
              "line": 238,
              "description": "Personal data sent to API without redaction \u2014 PII processed by third-party, compliance risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_cc",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_bcc",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_reply_to",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_send_all_extra_fields",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 321,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 328,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 328,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 328,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 328,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete_partial_match",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 339,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 339,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 339,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 339,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete_different_term",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 350,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 350,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 350,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 350,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete_no_term",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 359,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 359,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 359,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 359,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete_custom_model",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 362,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 362,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 372,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 372,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 372,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 372,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 386,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 386,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 386,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 386,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_tags_autocomplete_limit",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 394,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 394,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 403,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 403,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 403,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 403,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 412,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_menuitem_with_classname",
          "type": "function_definition",
          "line_start": 417,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_user_passes_test",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_user_fails_test",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_user_fails_test_ajax",
          "type": "function_definition",
          "line_start": 452,
          "line_end": 462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_superuser",
          "type": "function_definition",
          "line_start": 466,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_inactive_superuser",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_editor",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 482,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_moderator",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 490,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_no_permissions",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 497,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_admin_404_template_used_append_slash_true",
          "type": "function_definition",
          "line_start": 504,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 511,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 512,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_not_logged_in_redirect",
          "type": "function_definition",
          "line_start": 516,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 526,
          "line_end": 528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2217,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_return_correct_view_for_correct_url_without_ending_slash",
          "type": "function_definition",
          "line_start": 530,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 541,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 543,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 544,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        },
        {
          "name": "test_remove_stale_content_types_preserves_access_admin_permission",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 548,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 548,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 552,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5717,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.69)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 44,
        "avg_function_length": 10.61,
        "function_length_stddev": 6.22,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 41,
        "code_lines": 514,
        "comment_ratio": 0.0739,
        "comment_what_ratio": 0.6944,
        "naming_avg_length": 6.97,
        "debug_artifacts": [],
        "ai_smell_count": 70,
        "ai_smell_density": 0.136187,
        "structural_uniformity": 0.4142,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.68,
        "mechanical": 74.68,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\sidebar.py",
      "language": "python",
      "line_count": 256,
      "token_estimate": 1678,
      "functions": [
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 17,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 28,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 29,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 30,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 31,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 35,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 56,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 57,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 57,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 58,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 59,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 60,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 65,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 73,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 81,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 93,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 94,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 94,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 95,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 96,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 97,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 98,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 103,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 112,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3982,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 134,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 135,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 136,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 137,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 138,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 139,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 153,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 162,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3982,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 175,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 176,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 176,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 177,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 178,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 179,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 180,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 185,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 194,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 202,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3982,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 245,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2988,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 9.75,
        "function_length_stddev": 5.85,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 254,
        "comment_ratio": 0.0078,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.5,
        "debug_artifacts": [],
        "ai_smell_count": 48,
        "ai_smell_density": 0.188976,
        "structural_uniformity": 0.4002,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.85,
        "mechanical": 74.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\password_reset.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 152,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.38,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\bulk_action\\base_bulk_action.py",
      "language": "python",
      "line_count": 169,
      "token_estimate": 1342,
      "functions": [
        {
          "name": "display_name",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property",
            "abstractmethod"
          ]
        },
        {
          "name": "action_type",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property",
            "abstractmethod"
          ]
        },
        {
          "name": "aria_label",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property",
            "abstractmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "models",
          "type": "decorated_definition",
          "line_start": 53,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get_queryset",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 64,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 68,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_default_model",
          "type": "decorated_definition",
          "line_start": 74,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 75,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 75,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__run_before_hooks",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 84,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__run_after_hooks",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 90,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_all_objects_in_listing_query",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 95,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 95,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_actionable_objects",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 103,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 107,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "annotate_items",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 121,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "prepare_action",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "form_invalid",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 6.05,
        "function_length_stddev": 6.64,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 169,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.37,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.065089,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.63,
        "mechanical": 80.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\editing_sessions.py",
      "language": "python",
      "line_count": 217,
      "token_estimate": 2113,
      "functions": [
        {
          "name": "ping",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 192,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 20,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 23,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 28,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 28,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 36,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 73,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 96,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 122,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 138,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 154,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 171,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 171,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 192,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 192 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 192 lines (> 37 dynamic threshold)",
                "impact": "Function ping is 192 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3455,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ],
          "decorators": [
            "require_POST"
          ]
        },
        {
          "name": "release",
          "type": "decorated_definition",
          "line_start": 213,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": [],
          "decorators": [
            "require_POST"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 98,
        "function_length_stddev": 132.94,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 194,
        "comment_ratio": 0.106,
        "comment_what_ratio": 0.087,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.092784,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 61.8,
        "mechanical": 61.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\multiple_upload.py",
      "language": "python",
      "line_count": 401,
      "token_estimate": 3345,
      "functions": [
        {
          "name": "dispatch",
          "type": "decorated_definition",
          "line_start": 41,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 43,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 43,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3839,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "method_decorator(vary_on_headers(\"X-Requested-With\"))"
          ]
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "get_edit_object_form_context_data",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 64,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2283,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "get_edit_object_response_data",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "get_edit_upload_form_context_data",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 99,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2089,
          "ai_signals": []
        },
        {
          "name": "get_edit_upload_response_data",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "get_invalid_response_data",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 159,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 159,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 163,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 128,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function post is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3754,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 218,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 218,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 232,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 216,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function post is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3139,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 278,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 278,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3672,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0339,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 322,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 322,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 328,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 328,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 334,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 334,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 339,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 320,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function post is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3839,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 387,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 387,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3839,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 19.93,
        "function_length_stddev": 16.55,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 69,
        "code_lines": 332,
        "comment_ratio": 0.1721,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.18,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.072289,
        "structural_uniformity": 0.1695,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.25,
        "mechanical": 76.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\mixins.py",
      "language": "python",
      "line_count": 336,
      "token_estimate": 3242,
      "functions": [
        {
          "name": "write",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "list_to_str",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "__getattr__",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get_paginate_by",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "to_row_dict",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get_preprocess_function",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 192,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2921,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "preprocess_field_value",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "generate_xlsx_row",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 211,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3769,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "write_csv_row",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get_heading",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 228,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 228,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 233,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 234,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4087,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "stream_csv",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 244,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4087,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "write_xlsx",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 259,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 266,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4087,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "write_xlsx_response",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "write_csv_response",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "as_spreadsheet",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "get_export_url",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": []
        },
        {
          "name": "xlsx_export_url",
          "type": "decorated_definition",
          "line_start": 302,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "csv_export_url",
          "type": "decorated_definition",
          "line_start": 306,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "show_export_buttons",
          "type": "decorated_definition",
          "line_start": 310,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "header_more_buttons",
          "type": "decorated_definition",
          "line_start": 314,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0587,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 7.35,
        "function_length_stddev": 5.49,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 62,
        "code_lines": 274,
        "comment_ratio": 0.1845,
        "comment_what_ratio": 0.0408,
        "naming_avg_length": 7.12,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.032847,
        "structural_uniformity": 0.2528,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.05,
        "mechanical": 89.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\unpublish.py",
      "language": "python",
      "line_count": 80,
      "token_estimate": 746,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.031,
          "ai_signals": []
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.031,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.031,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.031,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 49,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1656,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 66,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.281,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 10.17,
        "function_length_stddev": 8.73,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 79,
        "comment_ratio": 0.0125,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.16,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.025316,
        "structural_uniformity": 0.1416,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.7,
        "mechanical": 92.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\listing.py",
      "language": "python",
      "line_count": 477,
      "token_estimate": 4121,
      "functions": [
        {
          "name": "get_filter_predicate",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "i18n_enabled",
          "type": "decorated_definition",
          "line_start": 165,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "show_locale_labels",
          "type": "decorated_definition",
          "line_start": 169,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 170,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_valid_orderings",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 182,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3025,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_ordering",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "annotate_queryset",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "order_queryset",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 223,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 223,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2746,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "search_queryset",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 248,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_table_kwargs",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 263,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 285,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": [],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 316,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 319,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "is_searching_whole_tree",
          "type": "decorated_definition",
          "line_start": 353,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "show_locale_labels",
          "type": "decorated_definition",
          "line_start": 359,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 360,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "search_queryset",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 384,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3832,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 392,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_history_url",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 397,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_reorder_url",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_table_kwargs",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_ordering",
          "type": "function_definition",
          "line_start": 407,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 420,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 428,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1732,
          "ai_signals": []
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 465,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        },
        {
          "name": "get_translations",
          "type": "function_definition",
          "line_start": 467,
          "line_end": 476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0332,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 30,
        "avg_function_length": 9.03,
        "function_length_stddev": 7.85,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 444,
        "comment_ratio": 0.0692,
        "comment_what_ratio": 0.0357,
        "naming_avg_length": 8.63,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.024775,
        "structural_uniformity": 0.1305,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.82,
        "mechanical": 89.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\usage.py",
      "language": "python",
      "line_count": 127,
      "token_estimate": 1118,
      "functions": [
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": [],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "verbose_name_plural",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4081,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0581,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 7,
        "function_length_stddev": 4.97,
        "import_count": 16,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 121,
        "comment_ratio": 0.0472,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.25,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.016529,
        "structural_uniformity": 0.2905,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.77,
        "mechanical": 94.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\page_types_usage.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1340,
      "functions": [
        {
          "name": "_get_locale_choices",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "_get_site_choices",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "_annotate_last_edit_info",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 43,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 43,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4364,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0864,
          "ai_signals": []
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 118,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3556,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 130,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 130,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 137,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4364,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 10,
        "function_length_stddev": 7.35,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 143,
        "comment_ratio": 0.0467,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 9.09,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.048951,
        "structural_uniformity": 0.2652,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.82,
        "mechanical": 83.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\viewsets\\pages.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 714,
      "functions": [
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": []
        },
        {
          "name": "get_index_view_kwargs",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": []
        },
        {
          "name": "get_choose_parent_view_kwargs",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": []
        },
        {
          "name": "index_view",
          "type": "decorated_definition",
          "line_start": 53,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "index_results_view",
          "type": "decorated_definition",
          "line_start": 59,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "choose_parent_view",
          "type": "decorated_definition",
          "line_start": 65,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.115,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 5.71,
        "function_length_stddev": 2.43,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 64,
        "comment_ratio": 0.1688,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5748,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\filtered_select.py",
      "language": "python",
      "line_count": 123,
      "token_estimate": 1076,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "build_attrs",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.025,
          "ai_signals": []
        },
        {
          "name": "optgroups",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 45,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 55,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 57,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 65,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 68,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 70,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 71,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 84,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 35,
              "description": "Function is 59 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 30 dynamic threshold)",
                "impact": "Function optgroups is 59 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_option",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 8,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 99,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 120,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.375,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 19.6,
        "function_length_stddev": 22.91,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 102,
        "comment_ratio": 0.1707,
        "comment_what_ratio": 0.125,
        "naming_avg_length": 6.74,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.166667,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 65.62,
        "mechanical": 65.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\apps.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 218,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 11,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.16,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.7,
        "mechanical": 88.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\tests\\test_images.py",
      "language": "python",
      "line_count": 611,
      "token_estimate": 5611,
      "functions": [
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "get_image_id_list",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 30,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 30,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 30,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 30,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 48,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 57,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 23,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 69,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 69,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 69,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 69,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 71,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 80,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 80,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 80,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 80,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 93,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 93,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 93,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 93,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 95,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 100,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 100,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 100,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 100,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 102,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 110,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 110,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 110,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 112,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 117,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 117,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 117,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 117,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 124,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 124,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 124,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 124,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 126,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields_then_remove_something",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 137,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 137,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 137,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 137,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 139,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_tags",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 147,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 147,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 147,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 147,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 149,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 160,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 160,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 160,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 160,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 169,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 169,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 169,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 169,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 176,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 176,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 176,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 176,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 183,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 183,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 183,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 183,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_exact_filter",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 192,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 192,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 192,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 192,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_on_id",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 199,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 199,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 199,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 199,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_tags",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 205,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 205,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 205,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 208,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 208,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 208,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 208,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 215,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 215,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 215,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 215,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 229,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 229,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 229,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 229,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_backwards",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 236,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 236,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 236,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 236,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 243,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 243,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 243,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 247,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 247,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 247,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_backwards_gives_error",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 254,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 254,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 254,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 254,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_with_offset_gives_error",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 263,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 263,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 263,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 263,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 272,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 272,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 272,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 272,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_only_two_items_returned",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 282,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 283,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 283,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 283,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 283,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_total_count",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 288,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 289,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 289,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 289,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 293,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 293,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 298,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 298,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 298,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 298,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_too_high_gives_error",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 304,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 305,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 305,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 305,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_max_none_gives_no_errors",
          "type": "decorated_definition",
          "line_start": 310,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 312,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 313,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 313,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 313,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 313,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 316,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 316,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=None)"
          ]
        },
        {
          "name": "test_limit_maximum_can_be_changed",
          "type": "decorated_definition",
          "line_start": 318,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 320,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 321,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 321,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 321,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 321,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=10)"
          ]
        },
        {
          "name": "test_limit_default_changes_with_max",
          "type": "decorated_definition",
          "line_start": 326,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 331,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 331,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 331,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 331,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=2)"
          ]
        },
        {
          "name": "test_offset_10_usually_appears_7th_in_list",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 339,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 339,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 339,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 339,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_10_moves_after_offset",
          "type": "function_definition",
          "line_start": 343,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 345,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 345,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 345,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 345,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_total_count",
          "type": "function_definition",
          "line_start": 349,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 351,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 351,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 351,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 351,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 355,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 355,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 360,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 360,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 360,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 360,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "get_image_id_list",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "test_search_for_james_joyce",
          "type": "function_definition",
          "line_start": 376,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 378,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 378,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 378,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 378,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_order",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 386,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 386,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 386,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 386,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_when_disabled_gives_error",
          "type": "decorated_definition",
          "line_start": 392,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 395,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 395,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 395,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 395,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_SEARCH_ENABLED=False)"
          ]
        },
        {
          "name": "test_search_when_filtering_by_tag_gives_error",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 402,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 402,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 402,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 419,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 426,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 426,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 426,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 426,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 438,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 419,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tags",
          "type": "function_definition",
          "line_start": 460,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 461,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 461,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 462,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 463,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 466,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 466,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 466,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 466,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 475,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 475,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 475,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 475,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 480,
          "line_end": 485,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 482,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 482,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 482,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 482,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 487,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 489,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 489,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 489,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 489,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_fields",
          "type": "function_definition",
          "line_start": 494,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 496,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 496,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 496,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 496,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 503,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 503,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 503,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 503,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 510,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 512,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 512,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 512,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 512,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 519,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 519,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 519,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 519,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 526,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 526,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 526,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 526,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields_on_non_relational_field_gives_error",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 533,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 533,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 533,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 533,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 543,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "test_without_parameters",
          "type": "function_definition",
          "line_start": 545,
          "line_end": 554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 552,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 552,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 552,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 552,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_id",
          "type": "function_definition",
          "line_start": 556,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": []
        },
        {
          "name": "test_find_by_id_nonexistent",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 574,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 572,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 572,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 572,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 572,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 590,
          "line_end": 593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 595,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1217,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_resave_image_purges",
          "type": "function_definition",
          "line_start": 600,
          "line_end": 604,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 602,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 602,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_image_purges",
          "type": "function_definition",
          "line_start": 606,
          "line_end": 610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 608,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 608,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4717,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 63,
        "avg_function_length": 7.83,
        "function_length_stddev": 6.42,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 28,
        "code_lines": 583,
        "comment_ratio": 0.0458,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 248,
        "ai_smell_density": 0.425386,
        "structural_uniformity": 0.18,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.03,
        "mechanical": 74.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\bin\\wagtail.py",
      "language": "python",
      "line_count": 452,
      "token_estimate": 3594,
      "functions": [
        {
          "name": "pluralize",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "create_parser",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "print_help",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 55,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "get_default_template_path",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 101,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 101 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 122,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 122 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 88,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 84,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function run is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3619,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 13,
            "max_nesting_depth": 4,
            "parameter_count": 5,
            "line_count": 78,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 253,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 253 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 262,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 262 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 272,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 272 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 224,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 232,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 203,
              "description": "Function is 78 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 78 lines (> 15 dynamic threshold)",
                "impact": "Function run is 78 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2978,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "_rewrite_line",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 283,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_show_diff",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 294,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 297,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 287,
              "description": "Function is 43 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 30 dynamic threshold)",
                "impact": "Function _show_diff is 43 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2728,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "_count_changes",
          "type": "function_definition",
          "line_start": 331,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 336,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 339,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3468,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "_rewrite_file",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 359,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 362,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3086,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 389,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 389 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "prog_name",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0286,
          "ai_signals": []
        },
        {
          "name": "help_index",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 404,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 404 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 407,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 407 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 409,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 409 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 408,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "unknown_command",
          "type": "function_definition",
          "line_start": 412,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 413,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 413 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            },
            {
              "id": "python-print-production",
              "severity": "low",
              "line": 414,
              "description": "print() call left in production code",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "print() call left in production code",
                "impact": "print() at line 414 should not appear in production code",
                "recommendation": "Replace with logging.getLogger() for structured, configurable logging",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://docs.python.org/3/howto/logging.html"
                ]
              }
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "main",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 4
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 421,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 428,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 434,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 443,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3786,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 16.7,
        "function_length_stddev": 19.67,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 445,
        "comment_ratio": 0.0155,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.7,
        "debug_artifacts": [
          "print line 101",
          "print line 122",
          "print line 253",
          "print line 262",
          "print line 272",
          "print line 389",
          "print line 404",
          "print line 407",
          "print line 409",
          "print line 413",
          "print line 414"
        ],
        "ai_smell_count": 30,
        "ai_smell_density": 0.067416,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.49,
        "mechanical": 64.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\migrations\\operations.py",
      "language": "python",
      "line_count": 333,
      "token_estimate": 2645,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "abstractmethod"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 14,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property",
            "abstractmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 40,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 47,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 72,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 79,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 107,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 135,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 160,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2707,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "map_temp_blocks_to_list_items",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 176,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 206,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2853,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 218,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 237,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 296,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.302,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 309,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": []
        },
        {
          "name": "apply",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 324,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.402,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "operation_name_fragment",
          "type": "decorated_definition",
          "line_start": 330,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.052,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 31,
        "avg_function_length": 5.1,
        "function_length_stddev": 3.77,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 110,
        "code_lines": 223,
        "comment_ratio": 0.3303,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.03139,
        "structural_uniformity": 0.26,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.86,
        "mechanical": 89.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\urls.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 194,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 30,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.4,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\base.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 179,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1262,
          "ai_signals": []
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1262,
          "ai_signals": []
        },
        {
          "name": "purge_batch",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 19,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 20,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 21,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4762,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "invalidates_hostname",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1262,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 3.5,
        "function_length_stddev": 1.29,
        "import_count": 2,
        "export_count": 1,
        "comment_lines": 5,
        "code_lines": 24,
        "comment_ratio": 0.1724,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.98,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.6311,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.62,
        "mechanical": 73.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\tests.py",
      "language": "python",
      "line_count": 854,
      "token_estimate": 8053,
      "functions": [
        {
          "name": "test_default",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_varnish",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_cloudflare",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_cloudfront",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_azure_cdn",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 117,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 117,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 129,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 129,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_azure_front_door",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_azure_cdn_get_client",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 160,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 160,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_azure_front_door_get_client",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_azure_cdn_purge",
          "type": "decorated_definition",
          "line_start": 191,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 201,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 201,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 221,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 222,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 191,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_azure_cdn_purge is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\n        \"wagtail.contrib.frontend_cache.backends.azure.AzureCdnBackend._make_purge_call\"\n    )"
          ]
        },
        {
          "name": "test_azure_front_door_purge",
          "type": "decorated_definition",
          "line_start": 233,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 262,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 263,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 233,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_azure_front_door_purge is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3369,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ],
          "decorators": [
            "mock.patch(\n        \"wagtail.contrib.frontend_cache.backends.azure.AzureFrontDoorBackend._make_purge_call\"\n    )"
          ]
        },
        {
          "name": "test_http",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_http_httperror",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 287,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2932,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_http_urlerror",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 298,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_test_http_with_side_effect",
          "type": "decorated_definition",
          "line_start": 305,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"wagtail.contrib.frontend_cache.backends.http.urlopen\")"
          ]
        },
        {
          "name": "test_cloudfront_validate_distribution_id",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_cloudfront_purge_with_query_string",
          "type": "decorated_definition",
          "line_start": 342,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\n        \"wagtail.contrib.frontend_cache.backends.cloudfront.CloudfrontBackend._create_invalidation\"\n    )"
          ]
        },
        {
          "name": "test_cloudfront_purge_root_with_query_string",
          "type": "decorated_definition",
          "line_start": 365,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\n        \"wagtail.contrib.frontend_cache.backends.cloudfront.CloudfrontBackend._create_invalidation\"\n    )"
          ]
        },
        {
          "name": "test_cloudfront_purge_batch_with_query_strings",
          "type": "decorated_definition",
          "line_start": 384,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 387,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 388,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 400,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\n        \"wagtail.contrib.frontend_cache.backends.cloudfront.CloudfrontBackend._create_invalidation\"\n    )"
          ]
        },
        {
          "name": "test_multiple",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_filter",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_backwards_compatibility",
          "type": "decorated_definition",
          "line_start": 451,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILFRONTENDCACHE_LOCATION=\"http://localhost:8000\")"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 466,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_purge_urls",
          "type": "function_definition",
          "line_start": 470,
          "line_end": 474,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 492,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_url_from_cache",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_urls_from_cache",
          "type": "function_definition",
          "line_start": 500,
          "line_end": 503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_page_from_cache",
          "type": "function_definition",
          "line_start": 505,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_page_from_cache_with_shared_cache_object",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_pages_from_cache",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_pages_from_cache_with_shared_cache_object",
          "type": "function_definition",
          "line_start": 544,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_batch",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 562,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 564,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 569,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 571,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 574,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_purge_batch_with_multiple_pages",
          "type": "function_definition",
          "line_start": 585,
          "line_end": 597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 585,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 587,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 589,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 592,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 595,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_purge_batches_with_shared_cache_object",
          "type": "function_definition",
          "line_start": 599,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 599,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 602,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 609,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 614,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 617,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalidate_specific_location",
          "type": "decorated_definition",
          "line_start": 622,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 634,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2144,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILFRONTENDCACHE={\n            \"varnish\": {\n                \"BACKEND\": \"wagtail.contrib.frontend_cache.tests.MockBackend\",\n                \"HOSTNAMES\": [\"example.com\"],\n            },\n        }\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 659,
          "line_end": 661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_cloudflare_purge_batch_chunked",
          "type": "function_definition",
          "line_start": 663,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 663,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 665,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 667,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 668,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 683,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_on_publish",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 693,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_on_unpublish",
          "type": "function_definition",
          "line_start": 695,
          "line_end": 701,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_with_unroutable_page",
          "type": "function_definition",
          "line_start": 703,
          "line_end": 709,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": []
        },
        {
          "name": "test_purge_on_publish_in_multilang_env",
          "type": "decorated_definition",
          "line_start": 711,
          "line_end": 731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ROOT_URLCONF=\"wagtail.test.urls_multilang\",\n        LANGUAGE_CODE=\"en\",\n        WAGTAILFRONTENDCACHE_LANGUAGES=[\"en\", \"fr\", \"pt-br\"],\n    )"
          ]
        },
        {
          "name": "test_purge_on_publish_with_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 733,
          "line_end": 752,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ROOT_URLCONF=\"wagtail.test.urls_multilang\",\n        LANGUAGE_CODE=\"en\",\n        WAGTAIL_I18N_ENABLED=True,\n        WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")],\n    )"
          ]
        },
        {
          "name": "test_purge_on_publish_without_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 754,
          "line_end": 767,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0744,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ROOT_URLCONF=\"wagtail.test.urls_multilang\",\n        LANGUAGE_CODE=\"en\",\n        WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")],\n    )"
          ]
        },
        {
          "name": "test_add_url",
          "type": "function_definition",
          "line_start": 776,
          "line_end": 780,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 777,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 778,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 780,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_urls",
          "type": "function_definition",
          "line_start": 782,
          "line_end": 786,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 783,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 784,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 786,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_page",
          "type": "function_definition",
          "line_start": 788,
          "line_end": 796,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 791,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 792,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 795,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_pages",
          "type": "function_definition",
          "line_start": 798,
          "line_end": 804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 799,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 800,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 803,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_calls",
          "type": "function_definition",
          "line_start": 806,
          "line_end": 821,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 809,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 810,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 811,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 812,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 815,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_http_error_on_cloudflare_purge_batch",
          "type": "decorated_definition",
          "line_start": 823,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 824,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 838,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 843,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 844,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 846,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 848,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4244,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"wagtail.contrib.frontend_cache.backends.cloudflare.requests.post\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 49,
        "avg_function_length": 14.53,
        "function_length_stddev": 9.53,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 42,
        "code_lines": 812,
        "comment_ratio": 0.0492,
        "comment_what_ratio": 0.0278,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 63,
        "ai_smell_density": 0.077586,
        "structural_uniformity": 0.3442,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.91,
        "mechanical": 77.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\base_formats.py",
      "language": "python",
      "line_count": 82,
      "token_estimate": 496,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 15,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 20,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 22,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_binary",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_read_mode",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "create_dataset",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "create_dataset",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_dataset_version",
              "severity": "medium",
              "line": 53,
              "description": "LangSmith dataset created without versioning -- no reproducibility for evaluations",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_binary",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_read_mode",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "create_dataset",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 6.11,
        "function_length_stddev": 6.77,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 72,
        "comment_ratio": 0.122,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.63,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.055556,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.28,
        "mechanical": 84.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0002_add_verbose_names.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 177,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 29,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\models.py",
      "language": "python",
      "line_count": 238,
      "token_estimate": 1925,
      "functions": [
        {
          "name": "title",
          "type": "decorated_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": []
        },
        {
          "name": "link",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 77,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2922,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "old_links",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": []
        },
        {
          "name": "get_is_permanent_display",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": []
        },
        {
          "name": "get_for_site",
          "type": "decorated_definition",
          "line_start": 105,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "add_redirect",
          "type": "decorated_definition",
          "line_start": 112,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 112,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function add_redirect is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1402,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "normalise_path",
          "type": "decorated_definition",
          "line_start": 156,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 156,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function normalise_path is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1302,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "normalise_page_route_path",
          "type": "decorated_definition",
          "line_start": 206,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0588,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 16.3,
        "function_length_stddev": 16.48,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 42,
        "code_lines": 196,
        "comment_ratio": 0.1765,
        "comment_what_ratio": 0.2941,
        "naming_avg_length": 7.3,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.015306,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.38,
        "mechanical": 92.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_import_utils.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 525,
      "functions": [
        {
          "name": "test_writing_file_with_format",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_full_doc_in_prompt",
              "severity": "medium",
              "line": 22,
              "description": "Entire document sent in prompt when summary would suffice -- wastes tokens and money",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_full_doc_in_prompt",
              "severity": "medium",
              "line": 22,
              "description": "Entire document sent when summary or relevant section would suffice -- wastes tokens",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2963,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_that_cache_storage_are_returned",
          "type": "decorated_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0163,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_REDIRECTS_FILE_STORAGE=\"cache\")"
          ]
        },
        {
          "name": "test_that_temp_folder_storage_are_returned_as_default",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0163,
          "ai_signals": []
        },
        {
          "name": "test_invalid_file_storage_raises_errors",
          "type": "decorated_definition",
          "line_start": 52,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0163,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_REDIRECTS_FILE_STORAGE=\"INVALID\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 9.5,
        "function_length_stddev": 10.41,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 58,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.98,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.034483,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.88,
        "mechanical": 89.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\views.py",
      "language": "python",
      "line_count": 416,
      "token_estimate": 3266,
      "functions": [
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "header_more_buttons",
          "type": "decorated_definition",
          "line_start": 123,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "delete_action",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "start_import",
          "type": "decorated_definition",
          "line_start": 210,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 83,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_dataset_version",
              "severity": "medium",
              "line": 262,
              "description": "LangSmith dataset created without versioning -- no reproducibility for evaluations",
              "fix_type": "deterministic"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 263,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 270,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 270,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 273,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 210,
              "description": "Function is 83 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 83 lines (> 37 dynamic threshold)",
                "impact": "Function start_import is 83 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.303,
          "ai_signals": [
            "High anti-pattern density (0.72)"
          ],
          "decorators": [
            "permission_checker.require_any(\"add\")"
          ]
        },
        {
          "name": "process_import",
          "type": "decorated_definition",
          "line_start": 295,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_dataset_version",
              "severity": "medium",
              "line": 319,
              "description": "LangSmith dataset created without versioning -- no reproducibility for evaluations",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 351,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 295,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function process_import is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1919,
          "ai_signals": [],
          "decorators": [
            "permission_checker.require_any(\"add\")",
            "require_http_methods([\"POST\"])"
          ]
        },
        {
          "name": "create_redirects_from_dataset",
          "type": "function_definition",
          "line_start": 371,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 376,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 404,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2392,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "to_readable_errors",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 17.2,
        "function_length_stddev": 26.42,
        "import_count": 24,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 412,
        "comment_ratio": 0.0096,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 9.06,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.026699,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.53,
        "mechanical": 89.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0002_capitalizeverbose.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 199,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 28,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\models.py",
      "language": "python",
      "line_count": 159,
      "token_estimate": 1134,
      "functions": [
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": []
        },
        {
          "name": "add_hit",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": []
        },
        {
          "name": "hits",
          "type": "decorated_definition",
          "line_start": 32,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "garbage_collect",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get",
          "type": "decorated_definition",
          "line_start": 51,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_most_popular",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "garbage_collect",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "title",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "link",
          "type": "decorated_definition",
          "line_start": 137,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 149,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.445,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.095,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 6.92,
        "function_length_stddev": 3.63,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 152,
        "comment_ratio": 0.044,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.14,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.019737,
        "structural_uniformity": 0.4752,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.15,
        "mechanical": 94.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\views\\reports.py",
      "language": "python",
      "line_count": 57,
      "token_estimate": 454,
      "functions": [
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1307,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1307,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1307,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 3.33,
        "function_length_stddev": 1.15,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 57,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.6,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6536,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.17,
        "mechanical": 98.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\models.py",
      "language": "python",
      "line_count": 221,
      "token_estimate": 1716,
      "functions": [
        {
          "name": "base_queryset",
          "type": "decorated_definition",
          "line_start": 32,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_cache_attr_name",
          "type": "decorated_definition",
          "line_start": 50,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3901,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "get_permission_policy",
          "type": "decorated_definition",
          "line_start": 63,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "page_url",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_page_url",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "__getstate__",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "get_permission_policy",
          "type": "decorated_definition",
          "line_start": 124,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "for_request",
          "type": "decorated_definition",
          "line_start": 128,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__getstate__",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "for_site",
          "type": "decorated_definition",
          "line_start": 150,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "_get_or_create",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "load",
          "type": "decorated_definition",
          "line_start": 191,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 10.13,
        "function_length_stddev": 8.94,
        "import_count": 8,
        "export_count": 3,
        "comment_lines": 67,
        "code_lines": 154,
        "comment_ratio": 0.3032,
        "comment_what_ratio": 0.0833,
        "naming_avg_length": 6.93,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.006494,
        "structural_uniformity": 0.1174,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.64,
        "mechanical": 97.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\generic\\test_model.py",
      "language": "python",
      "line_count": 124,
      "token_estimate": 1319,
      "functions": [
        {
          "name": "_create_importantpagesgenericsetting_object",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_request_or_site_with_site_returns_expected_settings",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_request_or_site_with_request_returns_expected_settings",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_request_or_site_with_request_result_caching",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 46,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 53,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5164,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_select_related",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_select_related_use_reduces_total_queries",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_get_page_url_returns_page_urls",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_get_page_url_raises_attributeerror_if_attribute_name_invalid",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_get_page_url_returns_empty_string_if_attribute_value_not_a_page",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 109,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5164,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.70)"
          ]
        },
        {
          "name": "test_display_as_string",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1664,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.70)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 10.4,
        "function_length_stddev": 3.1,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 111,
        "comment_ratio": 0.1048,
        "comment_what_ratio": 0.0909,
        "naming_avg_length": 10.47,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.027027,
        "structural_uniformity": 0.7021,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.12,
        "mechanical": 87.12,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\site_specific\\test_model.py",
      "language": "python",
      "line_count": 226,
      "token_estimate": 2412,
      "functions": [
        {
          "name": "test_for_site_returns_expected_settings",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_for_request_raises_does_not_exist_when_no_site_match",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"no-site-match.example\"])"
          ]
        },
        {
          "name": "test_for_site_raises_does_not_exist_when_site_is_none",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_for_request_returns_expected_settings",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_for_request_result_caching",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 48,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4067,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pickle_after_lookup_via_for_request",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "_create_importantpagessitesetting_object",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_importantpages_object_is_pickleable",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 83,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 83,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 91,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 91,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4067,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_select_related",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_select_related_use_reduces_total_queries",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_get_page_url_when_settings_fetched_via_for_request",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_get_page_url_when_for_settings_fetched_via_for_site",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_get_page_url_raises_attributeerror_if_attribute_name_invalid",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_get_page_url_returns_empty_string_if_attribute_value_not_a_page",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 219,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4067,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 14.29,
        "function_length_stddev": 11.1,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 41,
        "code_lines": 185,
        "comment_ratio": 0.1814,
        "comment_what_ratio": 0.0606,
        "naming_avg_length": 9.19,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.037838,
        "structural_uniformity": 0.2227,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.5,
        "mechanical": 83.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 193,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 31,
        "comment_ratio": 0.0312,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.91,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\views.py",
      "language": "python",
      "line_count": 162,
      "token_estimate": 1464,
      "functions": [
        {
          "name": "get_title",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_subtitle",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 47,
              "description": "Function is 41 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 30 dynamic threshold)",
                "impact": "Function post is 41 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1707,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_subtitle",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_title",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2692,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 7.87,
        "function_length_stddev": 9.69,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 156,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.4,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.019231,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.36,
        "mechanical": 91.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\table_block\\blocks.py",
      "language": "python",
      "line_count": 268,
      "token_estimate": 2387,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 61,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 63,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 108,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "field",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "value_for_form",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "is_html_renderer",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 178,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.43,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 216,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 228,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 182,
              "description": "Function is 55 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 30 dynamic threshold)",
                "impact": "Function render is 55 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2709,
          "ai_signals": [
            "High anti-pattern density (0.55)"
          ]
        },
        {
          "name": "get_table_options",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.08,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 14,
        "function_length_stddev": 14.84,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 25,
        "code_lines": 243,
        "comment_ratio": 0.0933,
        "comment_what_ratio": 0.4,
        "naming_avg_length": 7.19,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.032922,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.18,
        "mechanical": 85.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\typed_table_block\\tests.py",
      "language": "python",
      "line_count": 549,
      "token_estimate": 5484,
      "functions": [
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 28,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.13,
          "ai_signals": []
        },
        {
          "name": "test_value_from_datadict",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_submission_with_column_deletion_and_insertion",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 118,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 118,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 127,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 127,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 117,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_submission_with_column_deletion_and_insertion is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.427,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_normalize",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_to_python",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_get_api_representation",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_clean_deferred_propagates_to_child_blocks",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 291,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 297,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 301,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4051,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_validation_error_as_json",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_validation_error_without_cell_errors",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 357,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3687,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_validation_error_without_non_block_errors",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content_includes_caption_headings_and_cells",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 90,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 431,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 431,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 405,
              "description": "Function is 90 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 90 lines (> 37 dynamic threshold)",
                "impact": "Function test_extract_references is 90 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1937,
          "ai_signals": []
        },
        {
          "name": "test_extract_references_empty_table",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        },
        {
          "name": "test_block_lookup",
          "type": "function_definition",
          "line_start": 515,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.077,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 25.3,
        "function_length_stddev": 22.05,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 55,
        "code_lines": 494,
        "comment_ratio": 0.1002,
        "comment_what_ratio": 0.2564,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.026316,
        "structural_uniformity": 0.1286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.26,
        "mechanical": 88.26,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 56,
      "token_estimate": 441,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 56,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0008_document_file_size.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 100,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\models.py",
      "language": "python",
      "line_count": 224,
      "token_estimate": 1705,
      "functions": [
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 78,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2992,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "is_stored_locally",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 89,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4433,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "open_file",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "get_file_size",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 123,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 123 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 123,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 123,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4433,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_set_file_hash",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "get_file_hash",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "_set_document_file_metadata",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "filename",
          "type": "decorated_definition",
          "line_start": 155,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "file_extension",
          "type": "decorated_definition",
          "line_start": 159,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "url",
          "type": "decorated_definition",
          "line_start": 163,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 168,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 169,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 169,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 172,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 172,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4433,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_usage",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "usage_url",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_editable_by_user",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "content_type",
          "type": "decorated_definition",
          "line_start": 186,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "content_disposition",
          "type": "decorated_definition",
          "line_start": 195,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0933,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 8,
        "function_length_stddev": 6.45,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 201,
        "comment_ratio": 0.1027,
        "comment_what_ratio": 0.2727,
        "naming_avg_length": 7.77,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.049751,
        "structural_uniformity": 0.1938,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.78,
        "mechanical": 85.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_admin_views.py",
      "language": "python",
      "line_count": 2640,
      "token_estimate": 25560,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 54,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3753,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "make_docs",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 74,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 77,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_invalid",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 86,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 89,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 98,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 103,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 108,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_without_collections",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 116,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 117,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 118,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_with_collection",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 130,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 131,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 134,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_with_collection_filtered",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 162,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 174,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3248,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_collection_nesting",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 186,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_document_link_contains_next_url",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_search_form_rendered",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 206,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3977,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_tags",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 221,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 226,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 230,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 242,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 247,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 252,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 257,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 261,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 265,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 269,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 271,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 274,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 236,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_tag_filtering is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering_preserves_other_params",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 291,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 291,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 292,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 295,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 301,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_count_column",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 320,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2461,
          "ai_signals": []
        },
        {
          "name": "test_order_by_usage_count",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 350,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 361,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3561,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_filter_by_usage_count",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 382,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 367,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_filter_by_usage_count is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_bulk_action_rendered",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 410,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 411,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 417,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "make_docs",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 431,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 435,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 435,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 435,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 441,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_partial",
          "type": "function_definition",
          "line_start": 445,
          "line_end": 453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 451,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_q",
          "type": "function_definition",
          "line_start": 455,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_pagination_q",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 471,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering_with_search_term",
          "type": "function_definition",
          "line_start": 474,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 480,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 485,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 490,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_and_order_by_created_at",
          "type": "function_definition",
          "line_start": 492,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 512,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 516,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 520,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 522,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 523,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_usage_count_disabled_when_searching",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 539,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 543,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3977,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 560,
          "line_end": 569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 560,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 560,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 568,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 569,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_collection",
          "type": "function_definition",
          "line_start": 571,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 581,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 582,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 589,
          "line_end": 632,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 592,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 598,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 605,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 609,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 610,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 612,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 615,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 631,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 589,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collections",
          "type": "function_definition",
          "line_start": 634,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 640,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 644,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collection_nesting",
          "type": "function_definition",
          "line_start": 648,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 654,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_custom_document_model",
          "type": "decorated_definition",
          "line_start": 657,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 658,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 658,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 661,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 670,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 672,
          "line_end": 693,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_post_with_collections",
          "type": "function_definition",
          "line_start": 695,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_unique_together_validation_error",
          "type": "decorated_definition",
          "line_start": 721,
          "line_end": 747,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 742,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2357,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "test_add_too_large_file",
          "type": "decorated_definition",
          "line_start": 749,
          "line_end": 770,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 763,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 767,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4243,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 774,
          "line_end": 798,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 776,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 779,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 786,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 796,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 800,
          "line_end": 810,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 803,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 809,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collection_nesting",
          "type": "function_definition",
          "line_start": 812,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 820,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 822,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 825,
          "line_end": 846,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 859,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 861,
          "line_end": 876,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 865,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3248,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_post_with_limited_permissions",
          "type": "function_definition",
          "line_start": 878,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 882,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3561,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 893,
          "line_end": 918,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 898,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 906,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 910,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 911,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 913,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_with_collection_nesting",
          "type": "function_definition",
          "line_start": 920,
          "line_end": 929,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 928,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_next_url_is_present_in_edit_form",
          "type": "function_definition",
          "line_start": 931,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 973,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_next_url",
          "type": "function_definition",
          "line_start": 975,
          "line_end": 1000,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_with_missing_source_file",
          "type": "function_definition",
          "line_start": 1002,
          "line_end": 1016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1014,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3394,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 1018,
          "line_end": 1025,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1023,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reupload_different_file_size_and_file_hash",
          "type": "function_definition",
          "line_start": 1027,
          "line_end": 1057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_reupload_same_name",
          "type": "function_definition",
          "line_start": 1059,
          "line_end": 1079,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_reupload_different_name",
          "type": "function_definition",
          "line_start": 1081,
          "line_end": 1102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1107,
          "line_end": 1116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1118,
          "line_end": 1121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_get_with_custom_document_model",
          "type": "function_definition",
          "line_start": 1123,
          "line_end": 1132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1123,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1123,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1126,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1132,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unique_together_validation_error",
          "type": "function_definition",
          "line_start": 1134,
          "line_end": 1160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1155,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2357,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1164,
          "line_end": 1170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_delete_with_limited_permissions",
          "type": "function_definition",
          "line_start": 1172,
          "line_end": 1188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1176,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1187,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1187,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 1190,
          "line_end": 1211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1195,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1196,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4243,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 1213,
          "line_end": 1220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1219,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1219,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1222,
          "line_end": 1236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1225,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1226,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 1238,
          "line_end": 1254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1252,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1252,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 1256,
          "line_end": 1263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1261,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1276,
          "line_end": 1283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1280,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1280,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_doc_after_edit",
          "type": "function_definition",
          "line_start": 1285,
          "line_end": 1288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "check_form_media_in_response",
          "type": "function_definition",
          "line_start": 1290,
          "line_end": 1292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1292,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 1294,
          "line_end": 1319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1294,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1303,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1311,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1313,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_with_collections",
          "type": "function_definition",
          "line_start": 1321,
          "line_end": 1334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1330,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3561,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_add_with_selected_collection",
          "type": "function_definition",
          "line_start": 1336,
          "line_end": 1345,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_add_max_file_size_context_variables",
          "type": "decorated_definition",
          "line_start": 1347,
          "line_end": 1355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1351,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1353,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1000)"
          ]
        },
        {
          "name": "test_add_error_max_file_size_escaped",
          "type": "function_definition",
          "line_start": 1357,
          "line_end": 1379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1362,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1371,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post",
          "type": "function_definition",
          "line_start": 1381,
          "line_end": 1435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1396,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1400,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1401,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1403,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1405,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1406,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1409,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1410,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1414,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1414,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1419,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1421,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1422,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1422,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1424,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1427,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1427,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1427,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1427,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1431,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1381,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_with_title",
          "type": "function_definition",
          "line_start": 1437,
          "line_end": 1493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1453,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1457,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1458,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1459,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1460,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1461,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1463,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1464,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1467,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1468,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1472,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1472,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1477,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1479,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1480,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1480,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1482,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1485,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1485,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1485,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1485,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1489,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1437,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_with_title is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_with_collections",
          "type": "function_definition",
          "line_start": 1495,
          "line_end": 1547,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1516,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1520,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1521,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1522,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1523,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1526,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1526,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1531,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1533,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1534,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1534,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1536,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1539,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1539,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1539,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1539,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1543,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1495,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_with_collections is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_nofile",
          "type": "function_definition",
          "line_start": 1549,
          "line_end": 1556,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_edit_get",
          "type": "function_definition",
          "line_start": 1558,
          "line_end": 1568,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_edit_post",
          "type": "function_definition",
          "line_start": 1570,
          "line_end": 1595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1588,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1588,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1588,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1588,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_validation_error",
          "type": "function_definition",
          "line_start": 1597,
          "line_end": 1629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1615,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1620,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1624,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1624,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1624,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1624,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get",
          "type": "function_definition",
          "line_start": 1631,
          "line_end": 1641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_delete_post",
          "type": "function_definition",
          "line_start": 1643,
          "line_end": 1664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1657,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1657,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1660,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1660,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1660,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1660,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_doc_after_edit",
          "type": "function_definition",
          "line_start": 1673,
          "line_end": 1675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "check_form_media_in_response",
          "type": "function_definition",
          "line_start": 1677,
          "line_end": 1679,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1679,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 1685,
          "line_end": 1691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1688,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1688,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 1693,
          "line_end": 1696,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1705,
          "line_end": 1713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1710,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1710,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post",
          "type": "function_definition",
          "line_start": 1715,
          "line_end": 1768,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1731,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1735,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1736,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1738,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1740,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1743,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1745,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1749,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1751,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1752,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1752,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1754,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1757,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1757,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1757,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1757,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1763,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1715,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_with_title",
          "type": "function_definition",
          "line_start": 1770,
          "line_end": 1801,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1786,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1790,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1791,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1794,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1794,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1794,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1794,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1799,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_with_collections",
          "type": "function_definition",
          "line_start": 1803,
          "line_end": 1861,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1824,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1828,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1829,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1831,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1833,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1836,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1838,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1842,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1844,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1845,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1845,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1847,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1850,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1850,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1850,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1850,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1856,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1803,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_with_collections is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_doc_after_edit",
          "type": "function_definition",
          "line_start": 1863,
          "line_end": 1865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_create_from_upload_invalid_post",
          "type": "function_definition",
          "line_start": 1867,
          "line_end": 1922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1902,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1903,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1905,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1907,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1910,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1912,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1915,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1919,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1919,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1919,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1919,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1867,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_from_upload_invalid_post is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_from_upload",
          "type": "function_definition",
          "line_start": 1924,
          "line_end": 1972,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_model_no_labels",
              "severity": "low",
              "line": 1924,
              "description": "Vertex model deployed without labels \u2014 hard to track costs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1958,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1958,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1958,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1958,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1924,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_from_upload is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_uploaded_document",
          "type": "function_definition",
          "line_start": 1974,
          "line_end": 1996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1995,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1995,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1995,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1995,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2000,
          "line_end": 2001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2003,
          "line_end": 2034,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2006,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2007,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2007,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2007,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2007,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2011,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2011,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2013,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2033,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_with_collection_nesting",
          "type": "function_definition",
          "line_start": 2036,
          "line_end": 2043,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2042,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_custom_document_model",
          "type": "decorated_definition",
          "line_start": 2045,
          "line_end": 2059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2046,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2046,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2049,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2049,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2049,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2049,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2051,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2055,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2059,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2059,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 2061,
          "line_end": 2066,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 2061,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2061,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2066,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "make_docs",
          "type": "function_definition",
          "line_start": 2068,
          "line_end": 2071,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2069,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 2073,
          "line_end": 2085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2082,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2085,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_invalid",
          "type": "function_definition",
          "line_start": 2087,
          "line_end": 2095,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_pagination_out_of_range",
          "type": "function_definition",
          "line_start": 2097,
          "line_end": 2105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_construct_queryset_hook_browse",
          "type": "function_definition",
          "line_start": 2107,
          "line_end": 2126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2125,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2126,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_without_collections",
          "type": "function_definition",
          "line_start": 2128,
          "line_end": 2133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2132,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2133,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_with_collection",
          "type": "function_definition",
          "line_start": 2135,
          "line_end": 2143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2142,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2143,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2150,
          "line_end": 2151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_construct_queryset_hook_search",
          "type": "function_definition",
          "line_start": 2153,
          "line_end": 2174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 2153,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2153,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2173,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2174,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2178,
          "line_end": 2182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2184,
          "line_end": 2190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2189,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2189,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2189,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2189,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2194,
          "line_end": 2195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2197,
          "line_end": 2204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2201,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2203,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2203,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2203,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2203,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 2206,
          "line_end": 2222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2218,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2218,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2218,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2218,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unique_together_validation",
          "type": "decorated_definition",
          "line_start": 2224,
          "line_end": 2253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2247,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2227,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2257,
          "line_end": 2281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2259,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2262,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2269,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2279,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2283,
          "line_end": 2293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2287,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2289,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2289,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2289,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2293,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chooser_view",
          "type": "function_definition",
          "line_start": 2295,
          "line_end": 2304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2299,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2300,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2300,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2300,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2300,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2304,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post",
          "type": "function_definition",
          "line_start": 2306,
          "line_end": 2326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2318,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2318,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2318,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2318,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2332,
          "line_end": 2333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_unused_document_usage_count",
          "type": "function_definition",
          "line_start": 2335,
          "line_end": 2337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_used_document_usage_count",
          "type": "function_definition",
          "line_start": 2339,
          "line_end": 2347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_usage_count_appears",
          "type": "function_definition",
          "line_start": 2349,
          "line_end": 2358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_usage_count_zero_appears",
          "type": "function_definition",
          "line_start": 2360,
          "line_end": 2362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2368,
          "line_end": 2369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_unused_document_get_usage",
          "type": "function_definition",
          "line_start": 2371,
          "line_end": 2373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_used_document_get_usage",
          "type": "function_definition",
          "line_start": 2375,
          "line_end": 2387,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_usage_page",
          "type": "function_definition",
          "line_start": 2389,
          "line_end": 2418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2400,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2405,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2409,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2414,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2417,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_page_no_usage",
          "type": "function_definition",
          "line_start": 2420,
          "line_end": 2423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        },
        {
          "name": "test_usage_page_with_only_change_permission",
          "type": "function_definition",
          "line_start": 2425,
          "line_end": 2461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2439,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2442,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2450,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2452,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2461,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_page_without_change_permission",
          "type": "function_definition",
          "line_start": 2463,
          "line_end": 2487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2469,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2472,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2480,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2482,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2491,
          "line_end": 2523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2509,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2512,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2520,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2522,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 2525,
          "line_end": 2534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2528,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 2536,
          "line_end": 2539,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 2536,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2536,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2539,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add",
          "type": "function_definition",
          "line_start": 2541,
          "line_end": 2544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2541,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 2546,
          "line_end": 2579,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2551,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2557,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2563,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2576,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_edit",
          "type": "function_definition",
          "line_start": 2581,
          "line_end": 2627,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2609,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2581,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_edit is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.255,
          "ai_signals": []
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 2629,
          "line_end": 2634,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2634,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4561,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add_multiple",
          "type": "function_definition",
          "line_start": 2636,
          "line_end": 2639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1061,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 145,
        "avg_function_length": 16.45,
        "function_length_stddev": 13.54,
        "import_count": 24,
        "export_count": 0,
        "comment_lines": 280,
        "code_lines": 2360,
        "comment_ratio": 0.1061,
        "comment_what_ratio": 0.3538,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 389,
        "ai_smell_density": 0.164831,
        "structural_uniformity": 0.1766,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.36,
        "mechanical": 72.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_document_field.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 907,
      "functions": [
        {
          "name": "get_field",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "get_test_file",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_default_no_size_limit",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_large_file_passes_when_no_limit",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_no_help_text_when_no_limit",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": []
        },
        {
          "name": "test_file_within_limit_passes",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1 * 1024 * 1024)  # 1MB"
          ]
        },
        {
          "name": "test_file_exceeding_limit_raises_validation_error",
          "type": "decorated_definition",
          "line_start": 48,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1 * 1024 * 1024)  # 1MB"
          ]
        },
        {
          "name": "test_error_message_contains_file_size",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1 * 1024 * 1024)  # 1MB"
          ]
        },
        {
          "name": "test_none_setting_disables_limit",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=None)"
          ]
        },
        {
          "name": "test_help_text_shown_when_limit_set",
          "type": "decorated_definition",
          "line_start": 79,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1684,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_MAX_UPLOAD_SIZE=1 * 1024 * 1024)  # 1MB"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 6.1,
        "function_length_stddev": 3.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 69,
        "comment_ratio": 0.1786,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 9.3,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5085,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\utils.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 47,
      "functions": [
        {
          "name": "get_test_document_file",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 7,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\chooser.py",
      "language": "python",
      "line_count": 197,
      "token_estimate": 1527,
      "functions": [
        {
          "name": "get_chosen_response_data",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_class",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_kwargs",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 50,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 54,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 54,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_object_list",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "get_filter_form",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "collections",
          "type": "decorated_definition",
          "line_start": 74,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 84,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 87,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 88,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 88,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 92,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 92,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 92,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 97,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 97,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 122,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 122,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 130,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 130,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 142,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 146,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 147,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 148,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 156,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 160,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 161,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4444,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0944,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 6,
        "function_length_stddev": 3.27,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 197,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.21,
        "debug_artifacts": [],
        "ai_smell_count": 20,
        "ai_smell_density": 0.101523,
        "structural_uniformity": 0.4545,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.27,
        "mechanical": 74.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\blocks.py",
      "language": "python",
      "line_count": 99,
      "token_estimate": 798,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "html",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "get_default",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "value_for_form",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "value_from_form",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 6.7,
        "function_length_stddev": 3.86,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 85,
        "comment_ratio": 0.1414,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4239,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.15,
        "mechanical": 96.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\oembed.py",
      "language": "python",
      "line_count": 101,
      "token_estimate": 742,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 18,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 18,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 20,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 23,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 23,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 25,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 26,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 28,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 28,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_endpoint",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 34,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 34,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 35,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 35,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 35,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 38,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 38,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "accept",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 41,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 41,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "find_embed",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 45,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 45,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 46,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 46,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 64,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 65,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 92,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 43,
              "description": "Function is 55 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 30 dynamic threshold)",
                "impact": "Function find_embed is 55 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4167,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 19.5,
        "function_length_stddev": 24.42,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 95,
        "comment_ratio": 0.0594,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 6.87,
        "debug_artifacts": [],
        "ai_smell_count": 29,
        "ai_smell_density": 0.305263,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 60.77,
        "mechanical": 60.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0006_add_embed_hash.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 91,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\rich_text\\contentstate.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 429,
      "functions": [
        {
          "name": "media_embed_entity",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1895,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.95)"
          ]
        },
        {
          "name": "create_entity",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 47,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4395,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Suspiciously uniform function lengths (0.95)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13.5,
        "function_length_stddev": 0.71,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 46,
        "comment_ratio": 0.2069,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.82,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.021739,
        "structural_uniformity": 0.9476,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.02,
        "mechanical": 92.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\tests\\test_rich_text.py",
      "language": "python",
      "line_count": 160,
      "token_estimate": 1468,
      "functions": [
        {
          "name": "test_get_db_attributes",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0829,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor",
          "type": "decorated_definition",
          "line_start": 24,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 35,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 36,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3016,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_editor_catches_embed_not_found",
          "type": "decorated_definition",
          "line_start": 57,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0829,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_frontend_responsive",
          "type": "decorated_definition",
          "line_start": 69,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 81,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 82,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3872,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ],
          "decorators": [
            "override_settings(WAGTAILEMBEDS_RESPONSIVE_HTML=True)",
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_frontend_nonresponsive",
          "type": "decorated_definition",
          "line_start": 93,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 104,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 105,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.401,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_frontend_catches_embed_not_found",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0829,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_html_escaping_end_to_end",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 137,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 138,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 141,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4329,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_chooser_urls_exist",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0829,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 16.38,
        "function_length_stddev": 9.59,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 160,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.64,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.05625,
        "structural_uniformity": 0.4143,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.02,
        "mechanical": 84.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\hooks.py",
      "language": "python",
      "line_count": 116,
      "token_estimate": 711,
      "functions": [
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__enter__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__exit__",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 50,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_temporarily",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 54,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function register_temporarily is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0795,
          "ai_signals": []
        },
        {
          "name": "search_for_hooks",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_hooks",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 13.29,
        "function_length_stddev": 15.99,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 52,
        "code_lines": 64,
        "comment_ratio": 0.4483,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.046875,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.22,
        "mechanical": 82.22,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\api\\fields.py",
      "language": "python",
      "line_count": 60,
      "token_estimate": 439,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 31,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 31,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 33,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 33,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 38,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 38,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 54,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 14,
        "function_length_stddev": 14.14,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 20,
        "code_lines": 40,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.2,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.175,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.55,
        "mechanical": 69.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\edit_handlers.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 107,
      "functions": [
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.48,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0006_add_verbose_names.py",
      "language": "python",
      "line_count": 40,
      "token_estimate": 290,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 40,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0014_add_filter_spec_field.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 215,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 31,
        "comment_ratio": 0.0312,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0022_uploadedimage.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 337,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 45,
        "comment_ratio": 0.0217,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.45,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\permissions.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 360,
      "functions": [
        {
          "name": "__get__",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2724,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "set_permission_policy",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 29,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 29,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6224,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "update_permission_policy",
          "type": "decorated_definition",
          "line_start": 33,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2724,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "receiver(setting_changed)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 6.33,
        "function_length_stddev": 4.04,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 33,
        "comment_ratio": 0.2979,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 9.34,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.060606,
        "structural_uniformity": 0.3619,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.85,
        "mechanical": 84.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\static_src\\wagtailimages\\js\\focal-point-chooser.js",
      "language": "javascript",
      "line_count": 125,
      "token_estimate": 992,
      "functions": [
        {
          "name": "setupJcrop",
          "type": "function_declaration",
          "line_start": 3,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 9,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 9 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 10,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 10 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 11,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 11 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 12,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 12 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 32,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 32 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 41,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 41 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 50,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 50 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function setupJcrop is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 52,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 115,
        "comment_ratio": 0.08,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 6.46,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.069565,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.01,
        "mechanical": 70.01,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_form_overrides.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 851,
      "functions": [
        {
          "name": "test_get_image_base_form",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_get_image_form",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_get_image_form_widgets",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_tags_widget_with_custom_tag_model",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 30,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 30,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3962,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tags_longer_than_max_characters",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": []
        },
        {
          "name": "test_overridden_base_form",
          "type": "decorated_definition",
          "line_start": 58,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_IMAGE_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateImageForm\"\n    )"
          ]
        },
        {
          "name": "test_get_overridden_image_form",
          "type": "decorated_definition",
          "line_start": 64,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_IMAGE_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateImageForm\"\n    )"
          ]
        },
        {
          "name": "test_get_overridden_image_form_widgets",
          "type": "decorated_definition",
          "line_start": 72,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0462,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_IMAGE_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateImageForm\"\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 7.88,
        "function_length_stddev": 6.06,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 84,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.05,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.02381,
        "structural_uniformity": 0.2308,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.05,
        "mechanical": 94.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_signal_handlers.py",
      "language": "python",
      "line_count": 101,
      "token_estimate": 1068,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1591,
          "ai_signals": []
        },
        {
          "name": "test_image_file_deleted_oncommit",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5091,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_rendition_file_deleted_oncommit",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 53,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 53,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5091,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1591,
          "ai_signals": []
        },
        {
          "name": "test_image_model",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 85,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 85,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 86,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 86,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 87,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5091,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_does_not_exist",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1591,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 9.67,
        "function_length_stddev": 5.43,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 75,
        "comment_ratio": 0.2574,
        "comment_what_ratio": 0.3571,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.12,
        "structural_uniformity": 0.4384,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.0,
        "mechanical": 74.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\utils.py",
      "language": "python",
      "line_count": 162,
      "token_estimate": 1371,
      "functions": [
        {
          "name": "get_fill_filter_spec_migrations",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_circuit_breaker_inference",
              "severity": "medium",
              "line": 13,
              "description": "ML inference endpoint without circuit breaker -- cascading failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 15,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 15,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 19,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 28,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 28,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 29,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 29,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 35,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 35,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 47,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 12,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function get_fill_filter_spec_migrations is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3887,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "parse_color_string",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 65,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2054,
          "ai_signals": []
        },
        {
          "name": "generate_signature",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_vision_base64_too_large",
              "severity": "medium",
              "line": 93,
              "description": "Base64 image in Mistral request may exceed payload limit",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2887,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "verify_signature",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0387,
          "ai_signals": []
        },
        {
          "name": "find_image_duplicates",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0387,
          "ai_signals": []
        },
        {
          "name": "to_svg_safe_spec",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 131,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 131,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 135,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3887,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_allowed_image_extensions",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0387,
          "ai_signals": []
        },
        {
          "name": "get_accept_attributes",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 155,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 157,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 159,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3887,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 17,
        "function_length_stddev": 13.71,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 132,
        "comment_ratio": 0.1852,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.69,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.166667,
        "structural_uniformity": 0.1935,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.21,
        "mechanical": 69.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\images.py",
      "language": "python",
      "line_count": 528,
      "token_estimate": 4618,
      "functions": [
        {
          "name": "get_paginate_by",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_valid_orderings",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 111,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 111,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "needs_usage_count_subquery",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 117,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 117,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "current_collection",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_next_url",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 155,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3107,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "layout",
          "type": "decorated_definition",
          "line_start": 175,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 179,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 188,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 194,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 197,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 200,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 203,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 208,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 212,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 179,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function columns is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 221,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 251,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 252,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 252,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 253,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 253,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "next_url",
          "type": "decorated_definition",
          "line_start": 276,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 305,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 309,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 309,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_fields",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 371,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.119,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 390,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 390,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 401,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 407,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filter_spec",
          "type": "function_definition",
          "line_start": 413,
          "line_end": 427,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "preview",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 431,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 431,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 436,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 439,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 441,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 459,
          "line_end": 462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "confirmation_message",
          "type": "decorated_definition",
          "line_start": 464,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 474,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 489,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 490,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 490,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 491,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 491,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_initial_form_instance",
          "type": "function_definition",
          "line_start": 501,
          "line_end": 502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 502,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 502,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 504,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_base_object_queryset",
          "type": "function_definition",
          "line_start": 518,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 524,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 526,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.019,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 41,
        "avg_function_length": 8,
        "function_length_stddev": 8.94,
        "import_count": 26,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 507,
        "comment_ratio": 0.0398,
        "comment_what_ratio": 0.0952,
        "naming_avg_length": 8.55,
        "debug_artifacts": [],
        "ai_smell_count": 37,
        "ai_smell_density": 0.072978,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.73,
        "mechanical": 79.73,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\forms.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 329,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 19,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 35,
        "comment_ratio": 0.0541,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 8.06,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.8,
        "mechanical": 91.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\purge_revisions.py",
      "language": "python",
      "line_count": 94,
      "token_estimate": 834,
      "functions": [
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1093,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 35,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 48,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 30,
              "description": "Function is 23 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 23 lines (> 22 dynamic threshold)",
                "impact": "Function handle is 23 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4593,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge_revisions",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 82,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 84,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 90,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 91,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 93,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 55,
              "description": "Function is 39 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 30 dynamic threshold)",
                "impact": "Function purge_revisions is 39 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4593,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 26,
        "function_length_stddev": 11.79,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 89,
        "comment_ratio": 0.0532,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.09,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.101124,
        "structural_uniformity": 0.5465,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 61.2,
        "mechanical": 61.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0004_page_locked.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 105,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.04,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0012_extend_page_slug_field.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 130,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0020_add_index_on_page_first_published_at.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 124,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0027_fix_collection_path_collation.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 220,
      "functions": [
        {
          "name": "set_collection_path_collation",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 14,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 19,
        "comment_ratio": 0.3448,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.66,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.3,
        "mechanical": 93.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0035_page_last_published_at.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 119,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0043_lock_fields.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 264,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 36,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0051_taskstate_comment.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 101,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0059_apply_collection_ordering.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 238,
      "functions": [
        {
          "name": "apply_collection_ordering",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 20,
        "comment_ratio": 0.2593,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.21,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0067_alter_pagerevision_content_json.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 180,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0075_populate_latest_revision_and_revision_object_str.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 305,
      "functions": [
        {
          "name": "populate_latest_revision",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 10,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "populate_revision_object_str",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 22,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7.5,
        "function_length_stddev": 6.36,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.12,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.170732,
        "structural_uniformity": 0.1515,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0083_workflowcontenttype.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 329,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 40,
        "comment_ratio": 0.0244,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0091_remove_revision_submitted_for_moderation.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 94,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\__init__.py",
      "language": "python",
      "line_count": 111,
      "token_estimate": 839,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 12,
              "description": "Unused import: from django.contrib.contenttypes.models import ContentType",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ContentType' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from django.contrib.contenttypes.models import ContentType",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 13,
              "description": "Unused import: from modelcluster.fields import ParentalKey",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ParentalKey' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from modelcluster.fields import ParentalKey",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 14,
              "description": "Unused import: from modelcluster.models import ClusterableModel",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ClusterableModel' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from modelcluster.models import ClusterableModel",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 15,
              "description": "Unused import: from treebeard.mp_tree import MP_Node",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'MP_Node' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from treebeard.mp_tree import MP_Node",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 17,
              "description": "Unused import: from wagtail.query import PageQuerySet",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.query import PageQuerySet",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 19,
              "description": "Unused import: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseLogEntry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 19,
              "description": "Unused import: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseLogEntryManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 19,
              "description": "Unused import: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'LogEntryQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 19,
              "description": "Unused import: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ModelLogEntry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .audit_log import (  # noqa: F401\n    BaseLogEntry,\n    BaseLogEntryManager,\n    LogEntryQuerySet,\n    ModelLogEntry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 25,
              "description": "Unused import: from .content_types import get_default_page_content_type",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_default_page_content_type' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .content_types import get_default_page_content_type",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 26,
              "description": "Unused import: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import '_copy' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 26,
              "description": "Unused import: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import '_copy_m2m_relations' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 26,
              "description": "Unused import: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import '_extract_field_data' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .copying import _copy, _copy_m2m_relations, _extract_field_data",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 27,
              "description": "Unused import: from .draft_state import DraftStateMixin",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'DraftStateMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .draft_state import DraftStateMixin",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BootstrapTranslatableMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BootstrapTranslatableModel' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Locale' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'LocaleManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TranslatableMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'bootstrap_translatable_model' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 28,
              "description": "Unused import: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_translatable_models' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .i18n import (  # noqa: F401\n    BootstrapTranslatableMixin,\n    BootstrapTranslatableModel,\n    Locale,\n    LocaleManager,\n    TranslatableMixin,\n    bootstrap_translatable_model,\n    get_translatable_models,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 37,
              "description": "Unused import: from .locking import LockableMixin",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'LockableMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .locking import LockableMixin",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseCollectionManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Collection' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CollectionManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CollectionMember' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CollectionViewRestriction' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupCollectionPermission' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupCollectionPermissionManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'UploadedFile' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 38,
              "description": "Unused import: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_root_collection_id' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .media import (  # noqa: F401\n    BaseCollectionManager,\n    Collection,\n    CollectionManager,\n    CollectionMember,\n    CollectionViewRestriction,\n    GroupCollectionPermission,\n    GroupCollectionPermissionManager,\n    UploadedFile,\n    get_root_collection_id,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 49,
              "description": "Unused import: from .orderable import Orderable",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Orderable' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .orderable import Orderable",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'COMMENTS_RELATION_NAME' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PAGE_MODEL_CLASSES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PAGE_PERMISSION_CODENAMES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PAGE_PERMISSION_TYPE_CHOICES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PAGE_PERMISSION_TYPES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PAGE_TEMPLATE_VAR' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'AbstractPage' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BasePageManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Comment' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CommentReply' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupPagePermission' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupPagePermissionManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Page' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageBase' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageLogEntry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageLogEntryManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageLogEntryQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PagePermissionTester' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageSubscription' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageViewRestriction' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowPage' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_page_content_types' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_page_models' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_streamfield_names' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 50,
              "description": "Unused import: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'reassign_root_page_locale_on_delete' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .pages import (  # noqa: F401\n    COMMENTS_RELATION_NAME,\n    PAGE_MODEL_CLASSES,\n    PAGE_PERMISSION_CODENAMES,\n    PAGE_PERMISSION_TYPE_CHOICES,\n    PAGE_PERMISSION_TYPES,\n    PAGE_TEMPLATE_VAR,\n    AbstractPage,\n    BasePageManager,\n    Comment,\n    CommentReply,\n    GroupPagePermission,\n    GroupPagePermissionManager,\n    Page,\n    PageBase,\n    PageLogEntry,\n    PageLogEntryManager,\n    PageLogEntryQuerySet,\n    PageManager,\n    PagePermissionTester,\n    PageSubscription,\n    PageViewRestriction,\n    WorkflowPage,\n    get_page_content_types,\n    get_page_models,\n    get_streamfield_names,\n    reassign_root_page_locale_on_delete,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 78,
              "description": "Unused import: from .panels import CommentPanelPlaceholder, PanelPlaceholder",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CommentPanelPlaceholder' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .panels import CommentPanelPlaceholder, PanelPlaceholder",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 78,
              "description": "Unused import: from .panels import CommentPanelPlaceholder, PanelPlaceholder",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PanelPlaceholder' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .panels import CommentPanelPlaceholder, PanelPlaceholder",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 79,
              "description": "Unused import: from .preview import PreviewableMixin",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PreviewableMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .preview import PreviewableMixin",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 80,
              "description": "Unused import: from .reference_index import ReferenceIndex",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ReferenceIndex' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .reference_index import ReferenceIndex",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 81,
              "description": "Unused import: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageRevisionsManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 81,
              "description": "Unused import: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Revision' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 81,
              "description": "Unused import: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 81,
              "description": "Unused import: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 81,
              "description": "Unused import: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionsManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .revisions import (  # noqa: F401\n    PageRevisionsManager,\n    Revision,\n    RevisionMixin,\n    RevisionQuerySet,\n    RevisionsManager,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 88,
              "description": "Unused import: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupSitePermission' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 88,
              "description": "Unused import: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Site' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 88,
              "description": "Unused import: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'SiteManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 88,
              "description": "Unused import: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'SiteRootPath' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .sites import GroupSitePermission, Site, SiteManager, SiteRootPath",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 89,
              "description": "Unused import: from .specific import SpecificMixin",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'SpecificMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .specific import SpecificMixin",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 90,
              "description": "Unused import: from .view_restrictions import BaseViewRestriction",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseViewRestriction' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .view_restrictions import BaseViewRestriction",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'AbstractGroupApprovalTask' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'AbstractWorkflow' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseTaskStateManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'GroupApprovalTask' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Task' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TaskManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TaskQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TaskState' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TaskStateManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'TaskStateQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Workflow' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowContentType' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowState' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowStateManager' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowStateQuerySet' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 91,
              "description": "Unused import: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WorkflowTask' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .workflows import (  # noqa: F401\n    AbstractGroupApprovalTask,\n    AbstractWorkflow,\n    BaseTaskStateManager,\n    GroupApprovalTask,\n    Task,\n    TaskManager,\n    TaskQuerySet,\n    TaskState,\n    TaskStateManager,\n    TaskStateQuerySet,\n    Workflow,\n    WorkflowContentType,\n    WorkflowManager,\n    WorkflowMixin,\n    WorkflowState,\n    WorkflowStateManager,\n    WorkflowStateQuerySet,\n    WorkflowTask,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 22,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 101,
        "comment_ratio": 0.0901,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.27,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 91
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\media.py",
      "language": "python",
      "line_count": 240,
      "token_estimate": 2019,
      "functions": [
        {
          "name": "get_min_depth",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_indented_choices",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 23,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_ancestors",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_descendants",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_siblings",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_next_siblings",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_prev_siblings",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_view_restrictions",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_indented_name",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 112,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 113,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2593,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "natural_key",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_root_collection_id",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "natural_key",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 5.35,
        "function_length_stddev": 6.39,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 39,
        "code_lines": 201,
        "comment_ratio": 0.1625,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.024876,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.84,
        "mechanical": 92.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\specific.py",
      "language": "python",
      "line_count": 129,
      "token_estimate": 1413,
      "functions": [
        {
          "name": "get_specific",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 77,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 81,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 73 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 30 dynamic threshold)",
                "impact": "Function get_specific is 73 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1984,
          "ai_signals": []
        },
        {
          "name": "specific",
          "type": "decorated_definition",
          "line_start": 87,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0545,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "specific_deferred",
          "type": "decorated_definition",
          "line_start": 95,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0545,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "specific_class",
          "type": "decorated_definition",
          "line_start": 104,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0545,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "cached_content_type",
          "type": "decorated_definition",
          "line_start": 121,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0545,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 22.4,
        "function_length_stddev": 28.52,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 77,
        "code_lines": 52,
        "comment_ratio": 0.5969,
        "comment_what_ratio": 0.2727,
        "naming_avg_length": 6.37,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.057692,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.66,
        "mechanical": 77.66,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permissions.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 162,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 14.59,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\apps.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 81,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 11,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.67,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\deprecation.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 357,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1887,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.94)"
          ]
        },
        {
          "name": "get_content_type_filter",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 36,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4579,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Suspiciously uniform function lengths (0.94)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12.5,
        "function_length_stddev": 0.71,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 35,
        "comment_ratio": 0.2391,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.35,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.028571,
        "structural_uniformity": 0.9434,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.61,
        "mechanical": 86.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0006_customise_indexentry.py",
      "language": "python",
      "line_count": 239,
      "token_estimate": 2669,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 56,
        "code_lines": 183,
        "comment_ratio": 0.2343,
        "comment_what_ratio": 0.3846,
        "naming_avg_length": 7.31,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\signal_handlers.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 14,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\sites\\forms.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 166,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 7,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 22,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\bulk_actions\\__init__.py",
      "language": "python",
      "line_count": 4,
      "token_estimate": 17,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 1,
        "comment_lines": 0,
        "code_lines": 4,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.25,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_copy_view.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 361,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1556,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.78)"
          ]
        },
        {
          "name": "test_without_permission",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 24,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5056,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.78)"
          ]
        },
        {
          "name": "test_form_is_prefilled",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 33,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 36,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5056,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.78)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9,
        "function_length_stddev": 2.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 38,
        "comment_ratio": 0.0256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.49,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.105263,
        "structural_uniformity": 0.7778,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_management.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 223,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_unavailable_models",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5,
        "function_length_stddev": 5.2,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 25,
        "comment_ratio": 0.0741,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.67,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.0,
        "mechanical": 99.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_usage.py",
      "language": "python",
      "line_count": 220,
      "token_estimate": 2165,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1168,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_snippet_usage_count",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1168,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 36,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1168,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_snippet_used_by",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1168,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1168,
          "ai_signals": []
        },
        {
          "name": "test_use_latest_draft_as_title",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 71,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 73,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 96,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 98,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 99,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_without_edit_permission_on_snippet",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 113,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 115,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_without_edit_permission_on_page",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 138,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 143,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 144,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 156,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 157,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 158,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 159,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_with_describe_on_delete_cascade",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 172,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 173,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 174,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_with_describe_on_delete_set_null",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 191,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 192,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 193,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_with_describe_on_delete_gfk",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 215,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 216,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 217,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4668,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 14.92,
        "function_length_stddev": 10.47,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 213,
        "comment_ratio": 0.0318,
        "comment_what_ratio": 0.2857,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 26,
        "ai_smell_density": 0.122066,
        "structural_uniformity": 0.2984,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.27,
        "mechanical": 72.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tasks.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 332,
      "functions": [
        {
          "name": "update_reference_index_task",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 12,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 12,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 12,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "task()"
          ]
        },
        {
          "name": "delete_file_from_storage_task",
          "type": "decorated_definition",
          "line_start": 36,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0303,
          "ai_signals": [],
          "decorators": [
            "task()"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 15,
        "function_length_stddev": 12.73,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 40,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.1,
        "structural_uniformity": 0.1515,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.5,
        "mechanical": 73.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\context_processors.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 133,
      "functions": [
        {
          "name": "do_not_use_static_url",
          "type": "function_definition",
          "line_start": 1,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0791,
          "ai_signals": []
        },
        {
          "name": "count_calls",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0791,
          "ai_signals": []
        },
        {
          "name": "get_call_count",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0791,
          "ai_signals": []
        },
        {
          "name": "reset_call_count",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0791,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 4.75,
        "function_length_stddev": 2.87,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 29,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.34,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3953,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\models.py",
      "language": "python",
      "line_count": 97,
      "token_estimate": 812,
      "functions": [
        {
          "name": "_create_user",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 7,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 38,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1296,
          "ai_signals": []
        },
        {
          "name": "create_user",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "create_superuser",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_full_name",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_short_name",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 13,
              "description": "Unused import: from wagtail.admin.auth import permission_denied",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'permission_denied' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.auth import permission_denied",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 15,
              "description": "Unused import: from wagtail.admin.views.generic import chooser as chooser_views",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'chooser_views' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.views.generic import chooser as chooser_views",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 7.4,
        "function_length_stddev": 10.99,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 87,
        "comment_ratio": 0.1031,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.35,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.011494,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 2
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.21,
        "mechanical": 96.21,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\i18n\\migrations\\0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py",
      "language": "python",
      "line_count": 126,
      "token_estimate": 1028,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 125,
        "comment_ratio": 0.0079,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0006_standarsnippetwithcustomprimarykey.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 154,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.25,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\models.py",
      "language": "python",
      "line_count": 123,
      "token_estimate": 709,
      "functions": [
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 115,
        "comment_ratio": 0.065,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\apps.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 117,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 16,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 16,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 16,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 16,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 16,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.94,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.411765,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0004_eventindex_intro_max_length.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 105,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0012_set_genericsnippetpage_content_type_blank.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 218,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.56,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0020_genericsnippetnoindexpage_and_more.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 516,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 64,
        "comment_ratio": 0.0154,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.98,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0028_fullfeaturedsnippet_some_number.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 106,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.39,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0036_complexdefaultstreampage.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 296,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 28,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.46,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0044_custompreviewsizesmodel_custompreviewsizespage.py",
      "language": "python",
      "line_count": 53,
      "token_estimate": 381,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 52,
        "comment_ratio": 0.0189,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.07,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0052_variousondeletemodel_protected_page_and_user.py",
      "language": "python",
      "line_count": 40,
      "token_estimate": 295,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 39,
        "comment_ratio": 0.025,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.51,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0060_eventpagespeakeraward_certificate.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 175,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.46,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\urls.py",
      "language": "python",
      "line_count": 68,
      "token_estimate": 651,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 66,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\timestamps.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 197,
      "functions": [
        {
          "name": "submittable_timestamp",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 10,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 10,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 11,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 11,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "local_datetime",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0303,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 7.5,
        "function_length_stddev": 6.36,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 16,
        "comment_ratio": 0.3043,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.97,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.25,
        "structural_uniformity": 0.1515,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.25,
        "mechanical": 72.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_migrations.py",
      "language": "python",
      "line_count": 333,
      "token_estimate": 2974,
      "functions": [
        {
          "name": "_get_test_instances",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3819,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "assertBlocksRenamed",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_test_migrate_stream_data",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 96,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.248,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "_test_migrate_revisions",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 114,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 119,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 119,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 119,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 120,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 120,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 120,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_test_always_migrate_live_and_latest_revisions",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 138,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 146,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 146,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 146,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 147,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 147,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 147,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_test_migrate_revisions_from_date",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 167,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 177,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 177,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 177,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 178,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 178,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 178,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_migrate_stream_data",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "test_migrate_stream_data",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "test_migrate_revisions",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "test_always_migrate_live_and_latest_revisions",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "test_migrate_revisions_from_date",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "_get_test_instances",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 229,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "assert_null_content",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 248,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3554,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_migrate_stream_data",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "_get_test_instances",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 265,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_state_not_shared_across_instances",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "_get_test_instances",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "test_undefined_field_handled",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 11.14,
        "function_length_stddev": 10.07,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 55,
        "code_lines": 278,
        "comment_ratio": 0.1652,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 8.39,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.100719,
        "structural_uniformity": 0.0966,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.44,
        "mechanical": 70.44,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_date_validators.py",
      "language": "python",
      "line_count": 69,
      "token_estimate": 628,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_validates_past_date",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_validates_today",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_rejects_future_date",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_validates_none_value",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_custom_message",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": []
        },
        {
          "name": "test_validates_with_mocked_today",
          "type": "decorated_definition",
          "line_start": 51,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.056,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.fields.datetime\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 7.43,
        "function_length_stddev": 5.35,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 56,
        "comment_ratio": 0.1884,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.2799,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.14,
        "mechanical": 99.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_migrations.py",
      "language": "python",
      "line_count": 64,
      "token_estimate": 549,
      "functions": [
        {
          "name": "test__migrations",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 16,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 17,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 21,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 28,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 47,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 15,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test__migrations is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 49,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 60,
        "comment_ratio": 0.0625,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.2,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 52.8,
        "mechanical": 52.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_reference_index.py",
      "language": "python",
      "line_count": 953,
      "token_estimate": 9088,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 37,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 37,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 38,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 38,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 38,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 35,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3467,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "test",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_update",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 117,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 117,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 122,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 122,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 124,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 133,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 133,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 114,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_update is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_saving_base_model_does_not_remove_references",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_null_parental_key",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_lazy_parental_key",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_generic_foreign_key",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_model_index_ignore_generic_foreign_key",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_model_field_index_ignore_generic_foreign_key",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 243,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 243,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_model_with_uuid_primary_key",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_rebuild_references_index_no_verbosity",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_show_references_index",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": []
        },
        {
          "name": "test_inline_custom_pk_model",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 289,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 289,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3295,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 318,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0378,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 322,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 328,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 328,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 332,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 332,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_describe_source_field_and_on_delete",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 178,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 337,
              "description": "Function is 178 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 178 lines (> 37 dynamic threshold)",
                "impact": "Function test_describe_source_field_and_on_delete is 178 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0575,
          "ai_signals": []
        },
        {
          "name": "test_describe_source_field_and_on_delete_parental_key",
          "type": "function_definition",
          "line_start": 516,
          "line_end": 532,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 523,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2437,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_parental_key_with_related_query_name",
          "type": "function_definition",
          "line_start": 534,
          "line_end": 556,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 544,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.19,
          "ai_signals": []
        },
        {
          "name": "test_nonexistent_field",
          "type": "function_definition",
          "line_start": 558,
          "line_end": 572,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 563,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 563,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 565,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 565,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_foreign_key_in_nested_child_model",
          "type": "function_definition",
          "line_start": 574,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 574,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 574,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 580,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 586,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 602,
          "line_end": 657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 604,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 604,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 605,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 605,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 602,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function setUpTestData is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3503,
          "ai_signals": [
            "High anti-pattern density (0.89)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_get_references_to_in_bulk_with_empty_queryset_or_list",
          "type": "function_definition",
          "line_start": 659,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 662,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 662,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_references_to_in_bulk_with_queryset",
          "type": "function_definition",
          "line_start": 672,
          "line_end": 731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 675,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 675,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 696,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 696,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 697,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 697,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 672,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_references_to_in_bulk_with_queryset is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_references_to_in_bulk_with_list_of_mixed_instances",
          "type": "function_definition",
          "line_start": 733,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 756,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 756,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 757,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 757,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 758,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 758,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 733,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_references_to_in_bulk_with_list_of_mixed_instances is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_grouped_references_to_in_bulk_with_empty_queryset_or_list",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 804,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 804,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_grouped_references_to_in_bulk_with_queryset",
          "type": "function_definition",
          "line_start": 814,
          "line_end": 858,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 819,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 819,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 814,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_grouped_references_to_in_bulk_with_queryset is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2712,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_get_grouped_references_to_in_bulk_with_list_of_mixed_instances",
          "type": "function_definition",
          "line_start": 860,
          "line_end": 910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 860,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_grouped_references_to_in_bulk_with_list_of_mixed_instances is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1065,
          "ai_signals": []
        },
        {
          "name": "test_target_deletion_leaves_orphan",
          "type": "function_definition",
          "line_start": 914,
          "line_end": 952,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 927,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 927,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 914,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_target_deletion_leaves_orphan is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3071,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 28,
        "avg_function_length": 31.54,
        "function_length_stddev": 35.3,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 41,
        "code_lines": 912,
        "comment_ratio": 0.043,
        "comment_what_ratio": 0.1892,
        "naming_avg_length": 8.64,
        "debug_artifacts": [],
        "ai_smell_count": 63,
        "ai_smell_density": 0.069079,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.64,
        "mechanical": 73.64,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_translatablemixin.py",
      "language": "python",
      "line_count": 271,
      "token_estimate": 2570,
      "functions": [
        {
          "name": "make_test_instance",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 30,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2107,
          "ai_signals": []
        },
        {
          "name": "test_get_translations_inclusive_false",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translations_inclusive_true",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translation",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translation_using_locale_id",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translation_or_none_return_translation",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translation_or_none_return_none",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_has_translation_when_exists",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_has_translation_when_exists_using_locale_id",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_has_translation_when_none_exists",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_copy_for_translation",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_get_translation_model",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 110,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 110,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 111,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 111,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 115,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 115,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4016,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_inherited_model_for_translation",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_copy_clusterable_model_for_translation",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_localized_same_language",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_localized_different_language",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_unique_together_raises_no_error",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_unique_constraint_raises_no_error",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 206,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2358,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_raises_error_if_both_unique_constraint_and_unique_together_are_missing",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0516,
          "ai_signals": []
        },
        {
          "name": "test_error_with_both_unique_constraint_and_unique_together",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 251,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1812,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 22,
        "avg_function_length": 10.18,
        "function_length_stddev": 9.46,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 255,
        "comment_ratio": 0.059,
        "comment_what_ratio": 0.1875,
        "naming_avg_length": 9.41,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.035294,
        "structural_uniformity": 0.0704,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.67,
        "mechanical": 89.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\urls.py",
      "language": "python",
      "line_count": 40,
      "token_estimate": 331,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 32,
        "comment_ratio": 0.2,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0005_make_related_name_wagtail_specific.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 155,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0013_userprofile_density.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 142,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\__init__.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 24,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 1,
        "comment_lines": 0,
        "code_lines": 8,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 14.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\utils.py",
      "language": "python",
      "line_count": 89,
      "token_estimate": 615,
      "functions": [
        {
          "name": "user_can_delete_user",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_gravatar_url",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 30,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function get_gravatar_url is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0648,
          "ai_signals": []
        },
        {
          "name": "get_deleted_user_display_name",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 23.33,
        "function_length_stddev": 27.02,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 25,
        "code_lines": 64,
        "comment_ratio": 0.2809,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.96,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.015625,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.93,
        "mechanical": 85.93,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\users.py",
      "language": "python",
      "line_count": 394,
      "token_estimate": 3135,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 77,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 79,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 87,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 95,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 117,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 125,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 138,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 143,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 146,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 150,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 153,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 157,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 160,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 117,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function columns is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "model_fields",
          "type": "decorated_definition",
          "line_start": 164,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_fields",
          "type": "decorated_definition",
          "line_start": 168,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_list_buttons",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 189,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 192,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 184,
              "description": "Function is 33 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 33 lines (> 30 dynamic threshold)",
                "impact": "Function get_list_buttons is 33 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3382,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "order_queryset",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 265,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "save_instance",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 364,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "search_area_class",
          "type": "decorated_definition",
          "line_start": 369,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_search_area",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "register_search_area",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "on_register",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 27,
        "avg_function_length": 8.3,
        "function_length_stddev": 9.97,
        "import_count": 23,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 372,
        "comment_ratio": 0.0558,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 8.26,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.045699,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.45,
        "mechanical": 86.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\loading.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 129,
      "functions": [
        {
          "name": "get_custom_form",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 10,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 14,
        "comment_ratio": 0.0667,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.1,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.071429,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.14,
        "mechanical": 79.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\utils.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 351,
      "functions": [
        {
          "name": "deep_update",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 9,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "flatten_choices",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 30,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 37,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4506,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 18.5,
        "function_length_stddev": 9.19,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 14,
        "code_lines": 29,
        "comment_ratio": 0.3256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.39,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.137931,
        "structural_uniformity": 0.5031,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 57.45,
        "mechanical": 57.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\create_alias.py",
      "language": "python",
      "line_count": 269,
      "token_estimate": 2354,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 9,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_create_alias",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 18,
            "max_nesting_depth": 3,
            "parameter_count": 9,
            "line_count": 158,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 152,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 164,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 164,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 213,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 244,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 96,
              "description": "Function is 158 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 158 lines (> 15 dynamic threshold)",
                "impact": "Function _create_alias is 158 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1329,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 52.75,
        "function_length_stddev": 70.24,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 45,
        "code_lines": 224,
        "comment_ratio": 0.1673,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.026786,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 65.6,
        "mechanical": 65.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\copy.py",
      "language": "python",
      "line_count": 68,
      "token_estimate": 625,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0912,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 61,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 63,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4412,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 19.5,
        "function_length_stddev": 10.61,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 66,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.91,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.030303,
        "structural_uniformity": 0.4561,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.07,
        "mechanical": 80.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\filters.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 405,
      "functions": [
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 18,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.44,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Suspiciously uniform function lengths (0.85)"
          ]
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3895,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Suspiciously uniform function lengths (0.85)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 14.5,
        "function_length_stddev": 2.12,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 42,
        "comment_ratio": 0.087,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.88,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.047619,
        "structural_uniformity": 0.8537,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.5,
        "mechanical": 74.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\compare.py",
      "language": "python",
      "line_count": 875,
      "token_estimate": 7373,
      "functions": [
        {
          "name": "register_comparison_class",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "field_label",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 54,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_comparison_class_for_block",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "is_new",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "is_deleted",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 166,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 167,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 172,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 186,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 187,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 192,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_blocks_from_value",
          "type": "decorated_definition",
          "line_start": 210,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_blocks_by_id",
          "type": "decorated_definition",
          "line_start": 214,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_block_comparisons_by_id",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 228,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 253,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 263,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 268,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 268,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 220,
              "description": "Function is 59 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 30 dynamic threshold)",
                "impact": "Function get_block_comparisons_by_id is 59 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 283,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1845,
          "ai_signals": []
        },
        {
          "name": "get_blocks_from_value",
          "type": "decorated_definition",
          "line_start": 303,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_block_comparisons",
          "type": "function_definition",
          "line_start": 308,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmlvalue",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 314,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 316,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 321,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_blocks_from_value",
          "type": "decorated_definition",
          "line_start": 335,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_block_comparisons",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 363,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 384,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 340,
              "description": "Function is 51 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 30 dynamic threshold)",
                "impact": "Function get_block_comparisons is 51 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2154,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "has_block_ids",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 419,
          "line_end": 437,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_items",
          "type": "function_definition",
          "line_start": 441,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_item_display",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 447,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 454,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 456,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 458,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 461,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 464,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 467,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_item_display",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_objects",
          "type": "function_definition",
          "line_start": 487,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "htmldiff",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 519,
          "line_end": 524,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 519,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 524,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "field_label",
          "type": "function_definition",
          "line_start": 526,
          "line_end": 541,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 526,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 528,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 534,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 535,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 537,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_mapping",
          "type": "function_definition",
          "line_start": 543,
          "line_end": 637,
          "metrics": {
            "cyclomatic_complexity": 16,
            "max_nesting_depth": 5,
            "parameter_count": 2,
            "line_count": 95,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 587,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 588,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 602,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 604,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 619,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 629,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 633,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 543,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 543 in get_mapping makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 543,
              "description": "Function is 95 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 95 lines (> 15 dynamic threshold)",
                "impact": "Function get_mapping is 95 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3411,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "get_child_comparison",
          "type": "function_definition",
          "line_start": 639,
          "line_end": 642,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_child_comparisons",
          "type": "function_definition",
          "line_start": 644,
          "line_end": 675,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 663,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 671,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 644,
              "description": "Function is 32 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 32 lines (> 30 dynamic threshold)",
                "impact": "Function get_child_comparisons is 32 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3376,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 677,
          "line_end": 696,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 690,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1845,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 700,
          "line_end": 704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "is_addition",
          "type": "function_definition",
          "line_start": 706,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "is_deletion",
          "type": "function_definition",
          "line_start": 712,
          "line_end": 716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_position_change",
          "type": "function_definition",
          "line_start": 718,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "get_field_comparisons",
          "type": "function_definition",
          "line_start": 731,
          "line_end": 748,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 742,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 745,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 750,
          "line_end": 755,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 751,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_num_differences",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 768,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 764,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3012,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 772,
          "line_end": 774,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0095,
          "ai_signals": []
        },
        {
          "name": "to_html",
          "type": "function_definition",
          "line_start": 776,
          "line_end": 795,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 779,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1845,
          "ai_signals": []
        },
        {
          "name": "diff_text",
          "type": "function_definition",
          "line_start": 798,
          "line_end": 874,
          "metrics": {
            "cyclomatic_complexity": 12,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 77,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 820,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 841,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 843,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 845,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 848,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 851,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 854,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 861,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 798,
              "description": "Function is 77 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 77 lines (> 15 dynamic threshold)",
                "impact": "Function diff_text is 77 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 53,
        "avg_function_length": 14.04,
        "function_length_stddev": 18.63,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 146,
        "code_lines": 729,
        "comment_ratio": 0.1669,
        "comment_what_ratio": 0.0476,
        "naming_avg_length": 7.37,
        "debug_artifacts": [],
        "ai_smell_count": 61,
        "ai_smell_density": 0.083676,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.4,
        "mechanical": 71.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\comments.py",
      "language": "python",
      "line_count": 141,
      "token_estimate": 1278,
      "functions": [
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 25,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3589,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "serialize",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1256,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_chain_of_thought",
              "severity": "low",
              "line": 66,
              "description": "Complex reasoning task without chain-of-thought prompting -- reduced accuracy on multi-step problems",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_chain_of_thought",
              "severity": "low",
              "line": 66,
              "description": "Complex reasoning without chain-of-thought -- reduced accuracy on multi-step problems",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1256,
          "ai_signals": []
        },
        {
          "name": "serialize",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 90,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3315,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1256,
          "ai_signals": []
        },
        {
          "name": "serialize",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 122,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 130,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 130,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4756,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 14.29,
        "function_length_stddev": 7.7,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 132,
        "comment_ratio": 0.0638,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.24,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.05303,
        "structural_uniformity": 0.4612,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.17,
        "mechanical": 79.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\icons.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 264,
      "functions": [
        {
          "name": "get_icons",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 16,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 20,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "get_icon_sprite_hash",
          "type": "decorated_definition",
          "line_start": 34,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "get_icon_sprite_url",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 8,
        "function_length_stddev": 9.54,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 41,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.7,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.04878,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.81,
        "mechanical": 87.81,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0003_admin_managed.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 207,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 32,
        "comment_ratio": 0.0303,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.3,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\paginator.py",
      "language": "python",
      "line_count": 96,
      "token_estimate": 844,
      "functions": [
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 9,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "verbose_name",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "verbose_name_plural",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "items_count_label",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_elided_page_range",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 32,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function get_elided_page_range is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0547,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 16.6,
        "function_length_stddev": 26.52,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 69,
        "comment_ratio": 0.2812,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.88,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.057971,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.43,
        "mechanical": 81.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\model_utils.py",
      "language": "python",
      "line_count": 86,
      "token_estimate": 595,
      "functions": [
        {
          "name": "extract_panel_definitions_from_model_class",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 25,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 29,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 32,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4728,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_handler",
          "type": "decorated_definition",
          "line_start": 41,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 53,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 53,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4728,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "functools.cache"
          ]
        },
        {
          "name": "expand_panel_list",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 62,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2395,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 22.33,
        "function_length_stddev": 8.62,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 78,
        "comment_ratio": 0.093,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.614,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 66.24,
        "mechanical": 66.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\editors\\draftail\\features.py",
      "language": "python",
      "line_count": 95,
      "token_estimate": 648,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 17,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4405,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 22,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4405,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0905,
          "ai_signals": []
        },
        {
          "name": "construct_options",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0905,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0905,
          "ai_signals": []
        },
        {
          "name": "construct_options",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0905,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 4,
        "function_length_stddev": 2.19,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 74,
        "comment_ratio": 0.2211,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.82,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.040541,
        "structural_uniformity": 0.4523,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.95,
        "mechanical": 88.95,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\breadcrumbs.stories.tsx",
      "language": "tsx",
      "line_count": 85,
      "token_estimate": 411,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 17,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 24,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3182,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 11,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 4,
        "comment_lines": 0,
        "code_lines": 85,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.1,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.011765,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.76,
        "mechanical": 96.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\api\\test_renderer_classes.py",
      "language": "python",
      "line_count": 78,
      "token_estimate": 802,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0979,
          "ai_signals": []
        },
        {
          "name": "test_renderer_classes_with_rest_framework_installed",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0979,
          "ai_signals": []
        },
        {
          "name": "test_renderer_classes_without_rest_framework",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0979,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.api.v2.views.apps.is_installed\")"
          ]
        },
        {
          "name": "test_api_response_returns_json_by_default",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 46,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 46,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 46,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 46,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4479,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_api_response_returns_json_with_json_accept_header",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 60,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 60,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 60,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 60,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4479,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_api_response_returns_html_with_html_accept_header",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 72,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 72,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 75,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4479,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 9.5,
        "function_length_stddev": 4.85,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 67,
        "comment_ratio": 0.141,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.26,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.179104,
        "structural_uniformity": 0.4897,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.5,
        "mechanical": 74.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_bulk_actions\\test_bulk_delete.py",
      "language": "python",
      "line_count": 602,
      "token_estimate": 6281,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 58,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 26,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 53,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 58 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 58 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 58 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5123,
          "ai_signals": [
            "High anti-pattern density (0.86)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_bulk_delete_get",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 85,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 86,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4943,
          "ai_signals": [
            "High anti-pattern density (0.81)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_page_delete_specific_admin_title",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2106,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_page_delete_bad_permissions",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 140,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 143,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 149,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_bulk_delete_post",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 176,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 180,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 190,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 196,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4906,
          "ai_signals": [
            "High anti-pattern density (0.80)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_bulk_delete_notlive_post",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 234,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 238,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 259,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 209,
              "description": "Function is 62 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 60 dynamic threshold)",
                "impact": "Function test_bulk_delete_notlive_post is 62 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4928,
          "ai_signals": [
            "High anti-pattern density (0.81)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_subpage_deletion",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 304,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 308,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 312,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 313,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 319,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 323,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 272,
              "description": "Function is 67 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 60 dynamic threshold)",
                "impact": "Function test_subpage_deletion is 67 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_before_delete_page_hook",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 345,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 353,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 356,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_after_delete_page_hook",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 364,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 373,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 376,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 380,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3402,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 424,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3948,
          "ai_signals": [
            "High anti-pattern density (0.53)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_1",
          "type": "decorated_definition",
          "line_start": 431,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 457,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 463,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4164,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=10)"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_2",
          "type": "decorated_definition",
          "line_start": 466,
          "line_end": 509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 491,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 501,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 505,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 506,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 466,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_confirm_delete_scenario_2 is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=1)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_3",
          "type": "decorated_definition",
          "line_start": 511,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 537,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 544,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 544,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 554,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 558,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 559,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 511,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_confirm_delete_scenario_3 is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=3)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_4",
          "type": "decorated_definition",
          "line_start": 564,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 593,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 597,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 598,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 564,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_confirm_delete_scenario_4 is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5606,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=3)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 37.93,
        "function_length_stddev": 17.64,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 86,
        "code_lines": 516,
        "comment_ratio": 0.1429,
        "comment_what_ratio": 0.5179,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 55,
        "ai_smell_density": 0.106589,
        "structural_uniformity": 0.5349,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 58.32,
        "mechanical": 58.32,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_custom_listing.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 889,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1115,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 17,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 23,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 24,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 26,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 36,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 42,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 46,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_index_results",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 54,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 55,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 76,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 76,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4615,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 17.5,
        "function_length_stddev": 13.58,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 81,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.6,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.135802,
        "structural_uniformity": 0.2242,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.38,
        "mechanical": 71.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_parent_page_chooser_view.py",
      "language": "python",
      "line_count": 164,
      "token_estimate": 1513,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0652,
          "ai_signals": []
        },
        {
          "name": "test_get_page_parent_chooser",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 24,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 28,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 30,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4152,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_parent_chooser_redirect",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0652,
          "ai_signals": []
        },
        {
          "name": "test_no_parent_selected",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 64,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4152,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_no_add_subpage_permission",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 69,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 86,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 66,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_no_add_subpage_permission is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3277,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        },
        {
          "name": "test_choosing_parent_with_unsupported_subpage_type",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0652,
          "ai_signals": []
        },
        {
          "name": "test_skip_if_only_one_valid_parent",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0652,
          "ai_signals": []
        },
        {
          "name": "test_skip_if_user_only_has_permission_for_one_parent",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 141,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 144,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3452,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 17.62,
        "function_length_stddev": 11.88,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 161,
        "comment_ratio": 0.0183,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.3,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.062112,
        "structural_uniformity": 0.326,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.81,
        "mechanical": 81.81,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_admin_search.py",
      "language": "python",
      "line_count": 200,
      "token_estimate": 1840,
      "functions": [
        {
          "name": "search_other",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "test_other_searches",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 41,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 42,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 43,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 44,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 49,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_other",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "create_test_user",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 85,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_dashboard",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "test_search_other",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0657,
          "ai_signals": []
        },
        {
          "name": "test_eq",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 124,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_lt",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 137,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.335,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_le",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 157,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_gt",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 171,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.335,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_ge",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 185,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 191,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 11.14,
        "function_length_stddev": 7.48,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 40,
        "code_lines": 160,
        "comment_ratio": 0.2,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.01,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.08125,
        "structural_uniformity": 0.3286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.49,
        "mechanical": 78.49,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_contentstate.py",
      "language": "python",
      "line_count": 2086,
      "token_estimate": 18253,
      "functions": [
        {
          "name": "content_state_equal",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "assertContentStateEqual",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_paragraphs",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_unknown_block_becomes_paragraph",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 85,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_unknown_block_becomes_paragraph is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1809,
          "ai_signals": []
        },
        {
          "name": "test_bare_text_becomes_paragraph",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 129,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_bare_text_becomes_paragraph is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1569,
          "ai_signals": []
        },
        {
          "name": "test_ignore_unrecognised_tags_in_blocks",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_inline_styles",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_inline_styles_at_top_level",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_inline_styles_at_start_of_bare_block",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_inline_styles_depend_on_features",
          "type": "function_definition",
          "line_start": 302,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_ordered_list",
          "type": "function_definition",
          "line_start": 330,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 330,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_ordered_list is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1709,
          "ai_signals": []
        },
        {
          "name": "test_nested_list",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 77,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 380,
              "description": "Function is 77 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 77 lines (> 37 dynamic threshold)",
                "impact": "Function test_nested_list is 77 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.145,
          "ai_signals": []
        },
        {
          "name": "test_external_link",
          "type": "function_definition",
          "line_start": 458,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_link_in_bare_text",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_link_at_start_of_bare_text",
          "type": "function_definition",
          "line_start": 520,
          "line_end": 556,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_page_link",
          "type": "function_definition",
          "line_start": 558,
          "line_end": 588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_broken_page_link",
          "type": "function_definition",
          "line_start": 590,
          "line_end": 624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_link_to_root_page",
          "type": "function_definition",
          "line_start": 626,
          "line_end": 656,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_document_link",
          "type": "function_definition",
          "line_start": 658,
          "line_end": 692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_broken_document_link",
          "type": "function_definition",
          "line_start": 694,
          "line_end": 724,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_document_link_with_missing_id",
          "type": "function_definition",
          "line_start": 726,
          "line_end": 752,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_image_embed",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 760,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 760,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 754,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_image_embed is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.294,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_add_spacer_paragraph_between_image_embeds",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 814,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 814,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 815,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 815,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 809,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_spacer_paragraph_between_image_embeds is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.321,
          "ai_signals": [
            "High anti-pattern density (0.63)"
          ]
        },
        {
          "name": "test_image_after_list",
          "type": "function_definition",
          "line_start": 889,
          "line_end": 967,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 901,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 901,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 889,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_image_after_list is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2324,
          "ai_signals": []
        },
        {
          "name": "test_media_embed",
          "type": "decorated_definition",
          "line_start": 969,
          "line_end": 1038,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 980,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 981,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 969,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_media_embed is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2495,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_add_spacer_paras_between_media_embeds",
          "type": "decorated_definition",
          "line_start": 1040,
          "line_end": 1136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 97,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1051,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1052,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1040,
              "description": "Function is 97 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 97 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_spacer_paras_between_media_embeds is 97 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2078,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_hr",
          "type": "function_definition",
          "line_start": 1138,
          "line_end": 1186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1138,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_hr is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1709,
          "ai_signals": []
        },
        {
          "name": "test_add_spacer_paragraph_between_hrs",
          "type": "function_definition",
          "line_start": 1188,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1188,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_spacer_paragraph_between_hrs is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1502,
          "ai_signals": []
        },
        {
          "name": "test_block_element_in_paragraph",
          "type": "function_definition",
          "line_start": 1258,
          "line_end": 1304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1258,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_block_element_in_paragraph is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.174,
          "ai_signals": []
        },
        {
          "name": "test_br_element_in_paragraph",
          "type": "function_definition",
          "line_start": 1306,
          "line_end": 1330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_br_element_between_paragraphs",
          "type": "function_definition",
          "line_start": 1332,
          "line_end": 1366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_block_element_in_empty_paragraph",
          "type": "function_definition",
          "line_start": 1368,
          "line_end": 1417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1368,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_block_element_in_empty_paragraph is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1695,
          "ai_signals": []
        },
        {
          "name": "test_html_entities",
          "type": "function_definition",
          "line_start": 1419,
          "line_end": 1443,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_collapse_targeted_whitespace_characters",
          "type": "function_definition",
          "line_start": 1445,
          "line_end": 1480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1453,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1453,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1472,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1472,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4495,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_extra_end_tag_before",
          "type": "function_definition",
          "line_start": 1482,
          "line_end": 1509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_extra_end_tag_after",
          "type": "function_definition",
          "line_start": 1511,
          "line_end": 1538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_p_with_class",
          "type": "function_definition",
          "line_start": 1540,
          "line_end": 1576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_image_inside_paragraph",
          "type": "function_definition",
          "line_start": 1578,
          "line_end": 1631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1585,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 1585,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1578,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_image_inside_paragraph is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.294,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_image_inside_style",
          "type": "function_definition",
          "line_start": 1633,
          "line_end": 1730,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 98,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1641,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 1641,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1642,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 1642,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1633,
              "description": "Function is 98 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 98 lines (> 37 dynamic threshold)",
                "impact": "Function test_image_inside_style is 98 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2781,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_image_inside_link",
          "type": "function_definition",
          "line_start": 1732,
          "line_end": 1831,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 100,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1740,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 1740,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1741,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 1741,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1732,
              "description": "Function is 100 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 100 lines (> 37 dynamic threshold)",
                "impact": "Function test_image_inside_link is 100 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2745,
          "ai_signals": []
        },
        {
          "name": "test_external_link",
          "type": "function_definition",
          "line_start": 1835,
          "line_end": 1863,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_local_link",
          "type": "function_definition",
          "line_start": 1865,
          "line_end": 1893,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_reject_javascript_link",
          "type": "function_definition",
          "line_start": 1895,
          "line_end": 1922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_paragraphs_retain_keys",
          "type": "function_definition",
          "line_start": 1924,
          "line_end": 1956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0995,
          "ai_signals": []
        },
        {
          "name": "test_wrapped_block_retains_key",
          "type": "function_definition",
          "line_start": 1958,
          "line_end": 2003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1958,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_wrapped_block_retains_key is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1756,
          "ai_signals": []
        },
        {
          "name": "test_wrap_block_function",
          "type": "function_definition",
          "line_start": 2005,
          "line_end": 2048,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2041,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2005,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_wrap_block_function is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2586,
          "ai_signals": []
        },
        {
          "name": "test_style_fallback",
          "type": "function_definition",
          "line_start": 2050,
          "line_end": 2085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nemo_no_fact_checking",
              "severity": "high",
              "line": 2054,
              "description": "NeMo output rails missing fact-checking flow -- LLM hallucinations pass through to users unchecked",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1967,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 47,
        "avg_function_length": 42.96,
        "function_length_stddev": 21.58,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 203,
        "code_lines": 1883,
        "comment_ratio": 0.0973,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.22,
        "debug_artifacts": [],
        "ai_smell_count": 46,
        "ai_smell_density": 0.024429,
        "structural_uniformity": 0.4976,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.6,
        "mechanical": 83.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_html_ruleset.py",
      "language": "python",
      "line_count": 48,
      "token_estimate": 435,
      "functions": [
        {
          "name": "test_html_ruleset",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0162,
          "ai_signals": []
        },
        {
          "name": "test_precedence",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0162,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 20,
        "function_length_stddev": 18.38,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 48,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0808,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.0,
        "mechanical": 97.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_paginator.py",
      "language": "python",
      "line_count": 87,
      "token_estimate": 931,
      "functions": [
        {
          "name": "test_elided_page_range",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 80,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 85,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 7,
              "description": "Function is 80 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 80 lines (> 37 dynamic threshold)",
                "impact": "Function test_elided_page_range is 80 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0875,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 80,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 64,
        "comment_ratio": 0.2644,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.45,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.03125,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.69,
        "mechanical": 71.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_upgrade_notification.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1497,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_get_upgrade_check_setting_default",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_get_upgrade_check_setting_false",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=False)"
          ]
        },
        {
          "name": "test_get_upgrade_check_setting_LTS",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=\"LTS\")"
          ]
        },
        {
          "name": "test_get_upgrade_check_setting_lts",
          "type": "decorated_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=\"lts\")"
          ]
        },
        {
          "name": "test_upgrade_check_lts_only_default",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_upgrade_check_lts_only_setting_true",
          "type": "decorated_definition",
          "line_start": 42,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=False)"
          ]
        },
        {
          "name": "test_upgrade_check_lts_only_setting_LTS",
          "type": "decorated_definition",
          "line_start": 46,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=\"LTS\")"
          ]
        },
        {
          "name": "test_upgrade_check_lts_only_setting_lts",
          "type": "decorated_definition",
          "line_start": 50,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=\"lts\")"
          ]
        },
        {
          "name": "test_render_html_normal_user",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 58,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html_superuser",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 66,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 81,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3333,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_render_html_setting_false",
          "type": "decorated_definition",
          "line_start": 84,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 89,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_ENABLE_UPDATE_CHECK=False)"
          ]
        },
        {
          "name": "test_render_html_setting_lts",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 97,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 100,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 119,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_html_dismissed_version",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 129,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 145,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 8.64,
        "function_length_stddev": 9.56,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 150,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.05,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.06,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.18,
        "mechanical": 84.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\autosave.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 38,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.08,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\tables\\__init__.py",
      "language": "python",
      "line_count": 580,
      "token_estimate": 4833,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 8,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 49,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "header_template",
          "type": "decorated_definition",
          "line_start": 88,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "cell_template",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "render_header_html",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "render_cell_html",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 158,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3232,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 165,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2815,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_buttons",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 10,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 212,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 212,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 213,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 223,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 223,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 224,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 238,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3497,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_link_attrs",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_link_url",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_title_id",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_label_id",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 255,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 256,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 258,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 258,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 260,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 260,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 268,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 270,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 271,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_primary",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 312,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 327,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 333,
          "line_end": 341,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 356,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 371,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 378,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3008,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_aria_describedby",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 436,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 8,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 426,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 434,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 438,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 452,
          "line_end": 455,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 478,
          "line_end": 498,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 8,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_caption",
          "type": "function_definition",
          "line_start": 500,
          "line_end": 501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 509,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 512,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "rows",
          "type": "decorated_definition",
          "line_start": 516,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 518,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "row_count",
          "type": "decorated_definition",
          "line_start": 521,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 525,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_row_classname",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_row_attrs",
          "type": "function_definition",
          "line_start": 534,
          "line_end": 539,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "has_column_widths",
          "type": "function_definition",
          "line_start": 541,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "get_ascending_title_text",
          "type": "function_definition",
          "line_start": 544,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 546,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_descending_title_text",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 550,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 550,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3815,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 568,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 570,
          "line_end": 571,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": []
        },
        {
          "name": "classname",
          "type": "decorated_definition",
          "line_start": 573,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 577,
          "line_end": 579,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0315,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 62,
        "avg_function_length": 6,
        "function_length_stddev": 5.05,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 53,
        "code_lines": 527,
        "comment_ratio": 0.0914,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 33,
        "ai_smell_density": 0.062619,
        "structural_uniformity": 0.1577,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.75,
        "mechanical": 82.75,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\reports.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 445,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 54,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.59,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\bulk_action\\dispatcher.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 129,
      "functions": [
        {
          "name": "index",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 7,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 9,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 10,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 12,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.08,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.375,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.5,
        "mechanical": 69.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\__init__.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 201,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseListingView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseObjectMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BaseOperationView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailAdminTemplateMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import (  # noqa: F401\n    BaseListingView,\n    BaseObjectMixin,\n    BaseOperationView,\n    WagtailAdminTemplateMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 7,
              "description": "Unused import: from .history import HistoryView",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'HistoryView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .history import HistoryView",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'BeforeAfterHookMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CreateEditViewOptionalFeaturesMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'HookResponseMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'IndexViewOptionalFeaturesMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'JsonPostResponseMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'LocaleMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PanelMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionsRevertMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .mixins import (  # noqa: F401\n    BeforeAfterHookMixin,\n    CreateEditViewOptionalFeaturesMixin,\n    HookResponseMixin,\n    IndexViewOptionalFeaturesMixin,\n    JsonPostResponseMixin,\n    LocaleMixin,\n    PanelMixin,\n    RevisionsRevertMixin,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CopyView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CopyViewMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'CreateView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'DeleteView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'EditView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'IndexView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'InspectView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionsCompareView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'RevisionsUnscheduleView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 18,
              "description": "Unused import: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'UnpublishView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .models import (  # noqa: F401\n    CopyView,\n    CopyViewMixin,\n    CreateView,\n    DeleteView,\n    EditView,\n    IndexView,\n    InspectView,\n    RevisionsCompareView,\n    RevisionsUnscheduleView,\n    UnpublishView,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 30,
              "description": "Unused import: from .ordering import ReorderView",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ReorderView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .ordering import ReorderView",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 31,
              "description": "Unused import: from .permissions import PermissionCheckedMixin",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PermissionCheckedMixin' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .permissions import PermissionCheckedMixin",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 32,
              "description": "Unused import: from .usage import UsageView",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'UsageView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .usage import UsageView",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 33,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 26
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\ordering.py",
      "language": "python",
      "line_count": 80,
      "token_estimate": 867,
      "functions": [
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 28,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 21,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function post is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1453,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 30.5,
        "function_length_stddev": 40.31,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 64,
        "comment_ratio": 0.2,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 7.21,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.03125,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.29,
        "mechanical": 79.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\page_privacy.py",
      "language": "python",
      "line_count": 122,
      "token_estimate": 1091,
      "functions": [
        {
          "name": "set_privacy",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 12,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 108,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 14,
              "description": "Function is 108 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 108 lines (> 15 dynamic threshold)",
                "impact": "Function set_privacy is 108 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0324,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 108,
        "function_length_stddev": 0.0,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 119,
        "comment_ratio": 0.0246,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.36,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.008403,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 45.9,
        "mechanical": 45.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\choose_parent.py",
      "language": "python",
      "line_count": 136,
      "token_estimate": 1231,
      "functions": [
        {
          "name": "get_valid_parent_pages",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 52,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 23,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function get_valid_parent_pages is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2442,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 74,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.235,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 99,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 105,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.06,
          "ai_signals": []
        },
        {
          "name": "submit_button_label",
          "type": "decorated_definition",
          "line_start": 115,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 116,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 126,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.41,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 11.67,
        "function_length_stddev": 11.94,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 120,
        "comment_ratio": 0.1176,
        "comment_what_ratio": 0.3,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.075,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.08,
        "mechanical": 77.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\lock.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 302,
      "functions": [
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1503,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1503,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "perform_operation",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1503,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "perform_operation",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1503,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1503,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 3.6,
        "function_length_stddev": 0.89,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 39,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.59,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7515,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.7,
        "mechanical": 96.7,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\utils.py",
      "language": "python",
      "line_count": 91,
      "token_estimate": 784,
      "functions": [
        {
          "name": "get_breadcrumbs_items_for_page",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 6,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.296,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "breadcrumbs_items",
          "type": "decorated_definition",
          "line_start": 58,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0546,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0546,
          "ai_signals": []
        },
        {
          "name": "type_to_delete_confirmation",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0546,
          "ai_signals": []
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 8,
              "description": "Unused import: from wagtail.admin.utils import (  # noqa: F401\n    get_latest_str,\n    get_valid_next_url_from_request,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_valid_next_url_from_request' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.utils import (  # noqa: F401\n    get_latest_str,\n    get_valid_next_url_from_request,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 14.75,
        "function_length_stddev": 10.72,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 68,
        "comment_ratio": 0.2527,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.25,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.029412,
        "structural_uniformity": 0.2732,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.42,
        "mechanical": 87.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\workflows.py",
      "language": "python",
      "line_count": 301,
      "token_estimate": 2522,
      "functions": [
        {
          "name": "get_requested_by_queryset",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 36,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 36,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_editable_page_ids_query",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 42,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 42,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_editable_content_type_ids",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "filter_reviewable",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "filter_reviewable",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 176,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 177,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 180,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_title",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 201,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 201,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 258,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "header_buttons",
          "type": "decorated_definition",
          "line_start": 261,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_title",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 282,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 282,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4171,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0671,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 7.59,
        "function_length_stddev": 5.09,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 294,
        "comment_ratio": 0.0233,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.07,
        "debug_artifacts": [],
        "ai_smell_count": 12,
        "ai_smell_density": 0.040816,
        "structural_uniformity": 0.3296,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.15,
        "mechanical": 89.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\wagtail_hooks.py",
      "language": "python",
      "line_count": 1184,
      "token_estimate": 8466,
      "functions": [
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 90,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.25,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "register_explorer_menu_item",
          "type": "decorated_definition",
          "line_start": 100,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_settings_menu",
          "type": "decorated_definition",
          "line_start": 123,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "register_permissions",
          "type": "decorated_definition",
          "line_start": 134,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 137,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_pages_search_area",
          "type": "decorated_definition",
          "line_start": 155,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_search_area\")"
          ]
        },
        {
          "name": "register_collection_permissions_panel",
          "type": "decorated_definition",
          "line_start": 160,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_group_permission_panel\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_collections_menu_item",
          "type": "decorated_definition",
          "line_start": 172,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_workflows_menu_item",
          "type": "decorated_definition",
          "line_start": 203,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        },
        {
          "name": "register_workflow_tasks_menu_item",
          "type": "decorated_definition",
          "line_start": 214,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        },
        {
          "name": "page_listing_buttons",
          "type": "decorated_definition",
          "line_start": 225,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_listing_buttons\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 257,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "url",
          "type": "decorated_definition",
          "line_start": 301,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 330,
          "line_end": 331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 339,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "url",
          "type": "decorated_definition",
          "line_start": 350,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "page_listing_more_buttons",
          "type": "decorated_definition",
          "line_start": 355,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_listing_more_buttons\")"
          ]
        },
        {
          "name": "page_header_buttons",
          "type": "decorated_definition",
          "line_start": 369,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_header_buttons\")"
          ]
        },
        {
          "name": "register_viewsets_urls",
          "type": "decorated_definition",
          "line_start": 385,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "register_core_features",
          "type": "decorated_definition",
          "line_start": 391,
          "line_end": 834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 444,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 421,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 736,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 391,
              "description": "Function is 444 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 444 lines (> 37 dynamic threshold)",
                "impact": "Function register_core_features is 444 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0236,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 838,
          "line_end": 839,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 843,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 852,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 857,
          "line_end": 862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 866,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register_locked_pages_menu_item",
          "type": "decorated_definition",
          "line_start": 872,
          "line_end": 880,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_workflow_report_menu_item",
          "type": "decorated_definition",
          "line_start": 883,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_workflow_tasks_report_menu_item",
          "type": "decorated_definition",
          "line_start": 894,
          "line_end": 902,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_site_history_report_menu_item",
          "type": "decorated_definition",
          "line_start": 905,
          "line_end": 913,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_aging_pages_report_menu_item",
          "type": "decorated_definition",
          "line_start": 916,
          "line_end": 924,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_page_types_report_menu_item",
          "type": "decorated_definition",
          "line_start": 927,
          "line_end": 935,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_reports_menu",
          "type": "decorated_definition",
          "line_start": 938,
          "line_end": 946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "register_whats_new_in_wagtail_version_menu_item",
          "type": "decorated_definition",
          "line_start": 949,
          "line_end": 959,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_help_menu_item\")"
          ]
        },
        {
          "name": "register_editors_guide_menu_item",
          "type": "decorated_definition",
          "line_start": 962,
          "line_end": 971,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_help_menu_item\")"
          ]
        },
        {
          "name": "register_keyboard_shortcuts_menu_item",
          "type": "decorated_definition",
          "line_start": 974,
          "line_end": 994,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_help_menu_item\")"
          ]
        },
        {
          "name": "register_help_menu",
          "type": "decorated_definition",
          "line_start": 997,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "register_icons",
          "type": "decorated_definition",
          "line_start": 1008,
          "line_end": 1131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 124,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1008,
              "description": "Function is 124 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 124 lines (> 37 dynamic threshold)",
                "impact": "Function register_icons is 124 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0282,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_icons\")"
          ]
        },
        {
          "name": "add_pages_summary_item",
          "type": "decorated_definition",
          "line_start": 1134,
          "line_end": 1136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1136,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1136,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"construct_homepage_summary_items\")"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1140,
          "line_end": 1141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 1143,
          "line_end": 1147,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 54,
        "avg_function_length": 16.96,
        "function_length_stddev": 61.49,
        "import_count": 29,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 1172,
        "comment_ratio": 0.0101,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.47,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.007679,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.48,
        "mechanical": 95.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\slug.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 712,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 3,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 47,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 56 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 30 dynamic threshold)",
                "impact": "Function __init__ is 56 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1583,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 56,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 62,
        "comment_ratio": 0.1733,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 6.44,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.032258,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 51.14,
        "mechanical": 51.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\filters.py",
      "language": "python",
      "line_count": 301,
      "token_estimate": 2796,
      "functions": [
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 4,
            "parameter_count": 3,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 27,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 31,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 44,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 16,
              "description": "Function is 52 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 30 dynamic threshold)",
                "impact": "Function filter_queryset is 52 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4408,
          "ai_signals": [
            "High anti-pattern density (0.96)"
          ]
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 101,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 109,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 71,
              "description": "Function is 42 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 30 dynamic threshold)",
                "impact": "Function filter_queryset is 42 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3543,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 139,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 145,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 151,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 116,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function filter_queryset is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4299,
          "ai_signals": [
            "High anti-pattern density (0.93)"
          ]
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 175,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2501,
          "ai_signals": []
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 207,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.323,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 235,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2443,
          "ai_signals": []
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 264,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2389,
          "ai_signals": []
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1043,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 29.88,
        "function_length_stddev": 14.3,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 48,
        "code_lines": 253,
        "comment_ratio": 0.1595,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.97,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.063241,
        "structural_uniformity": 0.5214,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 60.29,
        "mechanical": 60.29,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\tests\\test_pages.py",
      "language": "python",
      "line_count": 1938,
      "token_estimate": 18177,
      "functions": [
        {
          "name": "get_total_page_count",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "get_page_id_list",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "get_homepage",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 59,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 59,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 59,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 59,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unpublished_pages_dont_appear_in_list",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 90,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 90,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 90,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 90,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_private_pages_dont_appear_in_list",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 105,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 105,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 105,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_private_pages_with_user_login",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_feedback",
              "severity": "medium",
              "line": 109,
              "description": "LangSmith runs without feedback collection -- no signal for evaluation or fine-tuning",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 118,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 118,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 118,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 118,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_private_pages_with_user_groups",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langsmith_no_feedback",
              "severity": "medium",
              "line": 124,
              "description": "LangSmith runs without feedback collection -- no signal for evaluation or fine-tuning",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 132,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 134,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 138,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 138,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 138,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 138,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_listing_with_missing_page_model",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 143,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 143,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 146,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type_filter_items_are_all_blog_entries",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 162,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 162,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 162,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 162,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 164,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type_filter_total_count",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 172,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 172,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 172,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 172,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_type_filter_multiple",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 179,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 179,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 179,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 179,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 184,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_non_existent_type_gives_error",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 202,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 202,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 202,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 202,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_non_page_type_gives_error",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 209,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 209,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 209,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 209,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_locale_filter",
          "type": "decorated_definition",
          "line_start": 216,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 224,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 224,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 224,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_translation_of_filter",
          "type": "decorated_definition",
          "line_start": 231,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 239,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 239,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 239,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 239,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_fields_default",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 248,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 248,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 248,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 248,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 250,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_default_with_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 257,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 261,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 261,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 261,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 261,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 263,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_fields",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 268,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 270,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 270,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 270,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 270,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 272,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 279,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 279,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 279,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 279,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 281,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 285,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 286,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 286,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 286,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 286,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 288,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 299,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 299,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 299,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 299,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 301,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 306,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 306,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 306,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 306,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 308,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 313,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 313,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 313,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 313,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 315,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_fields_then_remove_something",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 351,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 351,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 351,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 351,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 353,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_fields",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 384,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 384,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 384,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 384,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 386,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 392,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 394,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 394,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 394,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 394,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 396,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_nested_fields",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 404,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 406,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 406,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 406,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 406,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 408,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_nested_fields",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 413,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 415,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 415,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 415,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 415,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 417,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_nested_fields",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 425,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 427,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 427,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 427,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 427,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 429,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_nested_fields",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 448,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 434,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 436,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 436,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 436,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 436,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 438,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 439,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_child_relation",
          "type": "function_definition",
          "line_start": 450,
          "line_end": 458,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 454,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 454,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 454,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 454,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 456,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_foreign_key",
          "type": "function_definition",
          "line_start": 460,
          "line_end": 482,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 462,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 464,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 464,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 464,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 464,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 466,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 478,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_tags",
          "type": "function_definition",
          "line_start": 484,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 486,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 486,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 486,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 486,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 488,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_ordering",
          "type": "function_definition",
          "line_start": 492,
          "line_end": 512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 494,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 498,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 498,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 498,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 498,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 502,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 514,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 516,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 516,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 516,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 516,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unknown_nested_fields_give_error",
          "type": "function_definition",
          "line_start": 523,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 525,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 527,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 527,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 527,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 527,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_parent_field_gives_error",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 535,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 535,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 535,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 535,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_without_type_gives_error",
          "type": "function_definition",
          "line_start": 540,
          "line_end": 545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 542,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 542,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 542,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 542,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 547,
          "line_end": 552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 549,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 549,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 549,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 549,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 554,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 556,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 556,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 556,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 556,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 563,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 563,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 563,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 563,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields_on_non_relational_field_gives_error",
          "type": "function_definition",
          "line_start": 568,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 572,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 572,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 572,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 572,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_exact_filter",
          "type": "function_definition",
          "line_start": 579,
          "line_end": 584,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 581,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 581,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 581,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 581,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_exact_filter_on_specific_field",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 588,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 588,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 588,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 588,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_on_id",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 595,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 595,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 595,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 595,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_on_foreign_key",
          "type": "function_definition",
          "line_start": 600,
          "line_end": 605,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 601,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 602,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 602,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 602,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 602,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_on_boolean",
          "type": "function_definition",
          "line_start": 607,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 609,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 609,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 609,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 609,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_doesnt_work_on_specific_fields_without_type",
          "type": "function_definition",
          "line_start": 614,
          "line_end": 624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 616,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 616,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 616,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 616,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_tags",
          "type": "function_definition",
          "line_start": 626,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 628,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 628,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 628,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 628,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_multiple_tags",
          "type": "function_definition",
          "line_start": 633,
          "line_end": 638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 635,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 635,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 635,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 635,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 640,
          "line_end": 650,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 642,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 642,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 642,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_id_int_validation",
          "type": "function_definition",
          "line_start": 652,
          "line_end": 662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 654,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 654,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 654,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 654,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_foreign_key_int_validation",
          "type": "function_definition",
          "line_start": 664,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 665,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 666,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 666,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 666,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 666,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_boolean_validation",
          "type": "function_definition",
          "line_start": 674,
          "line_end": 684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 676,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 676,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 676,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 676,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_slug_field_containing_null_bytes_gives_error",
          "type": "function_definition",
          "line_start": 686,
          "line_end": 694,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 688,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 688,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 688,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 688,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_filter",
          "type": "function_definition",
          "line_start": 698,
          "line_end": 703,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 700,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 700,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 700,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 700,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_root",
          "type": "function_definition",
          "line_start": 705,
          "line_end": 711,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 708,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 708,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 708,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 708,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_with_type",
          "type": "function_definition",
          "line_start": 713,
          "line_end": 718,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 715,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 715,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 715,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 715,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_unknown_page_gives_error",
          "type": "function_definition",
          "line_start": 720,
          "line_end": 725,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 722,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 722,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 722,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 722,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 727,
          "line_end": 732,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 729,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 729,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 729,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 729,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_child_of_page_thats_not_in_same_site_gives_error",
          "type": "function_definition",
          "line_start": 734,
          "line_end": 740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 737,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 737,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 737,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 737,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of_filter",
          "type": "function_definition",
          "line_start": 744,
          "line_end": 749,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 746,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of_with_type",
          "type": "function_definition",
          "line_start": 751,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 753,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of_unknown_page_gives_error",
          "type": "function_definition",
          "line_start": 758,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 760,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 770,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 767,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ancestor_of_home_page_ignores_root",
          "type": "function_definition",
          "line_start": 772,
          "line_end": 778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 775,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_filter",
          "type": "function_definition",
          "line_start": 782,
          "line_end": 787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 784,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 784,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 784,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 784,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_root",
          "type": "function_definition",
          "line_start": 789,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 793,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 793,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 793,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 793,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_with_type",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 806,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 803,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 803,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 803,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 803,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_unknown_page_gives_error",
          "type": "function_definition",
          "line_start": 808,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 810,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 810,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 810,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 810,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 822,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 817,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 817,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 817,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 817,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_page_thats_not_in_same_site_gives_error",
          "type": "function_definition",
          "line_start": 824,
          "line_end": 830,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 827,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 827,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 827,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 827,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_descendant_of_when_filtering_by_child_of_gives_error",
          "type": "function_definition",
          "line_start": 832,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 834,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 834,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 834,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 834,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_site_filter_same_hostname_returns_error",
          "type": "function_definition",
          "line_start": 844,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 846,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 846,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 846,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 846,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_site_filter",
          "type": "function_definition",
          "line_start": 855,
          "line_end": 861,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 857,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 857,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 857,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 857,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_default",
          "type": "function_definition",
          "line_start": 865,
          "line_end": 873,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 867,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 867,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 867,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 867,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title",
          "type": "function_definition",
          "line_start": 875,
          "line_end": 883,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 877,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 877,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 877,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 877,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_backwards",
          "type": "function_definition",
          "line_start": 885,
          "line_end": 893,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 887,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 887,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 887,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 887,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random",
          "type": "function_definition",
          "line_start": 895,
          "line_end": 904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 897,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 897,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 897,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 901,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 901,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 901,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_backwards_gives_error",
          "type": "function_definition",
          "line_start": 906,
          "line_end": 913,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 908,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 908,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 908,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 908,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_random_with_offset_gives_error",
          "type": "function_definition",
          "line_start": 915,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 917,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 917,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 917,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 917,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_default_with_type",
          "type": "function_definition",
          "line_start": 924,
          "line_end": 929,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 926,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 926,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 926,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 926,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_with_type",
          "type": "function_definition",
          "line_start": 931,
          "line_end": 936,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 933,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 933,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 933,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 933,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_specific_field_with_type",
          "type": "function_definition",
          "line_start": 938,
          "line_end": 943,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 940,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 940,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 940,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 940,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 945,
          "line_end": 952,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 947,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 947,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 947,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 947,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_random_ordering_with_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 954,
          "line_end": 961,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 956,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 956,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 956,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 956,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_id_and_slug",
          "type": "function_definition",
          "line_start": 963,
          "line_end": 989,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 965,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 965,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 965,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 965,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering_by_title_and_id_backwards",
          "type": "function_definition",
          "line_start": 991,
          "line_end": 1003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 993,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 993,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 993,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 993,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_only_two_items_returned",
          "type": "function_definition",
          "line_start": 1007,
          "line_end": 1011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 1008,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1009,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1009,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1009,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1009,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_total_count",
          "type": "function_definition",
          "line_start": 1013,
          "line_end": 1018,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 1014,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1015,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1015,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1015,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1015,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 1020,
          "line_end": 1025,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1022,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1022,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1022,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1022,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_too_high_gives_error",
          "type": "function_definition",
          "line_start": 1027,
          "line_end": 1032,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 1028,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1029,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1029,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1029,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1029,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limit_max_none_gives_no_errors",
          "type": "decorated_definition",
          "line_start": 1034,
          "line_end": 1040,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 1036,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1037,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1037,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1037,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1037,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=None)"
          ]
        },
        {
          "name": "test_limit_maximum_can_be_changed",
          "type": "decorated_definition",
          "line_start": 1042,
          "line_end": 1048,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_no_similarity_threshold",
              "severity": "medium",
              "line": 1044,
              "description": "Returning vector search results without similarity score threshold -- irrelevant results passed to LLM",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1045,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1045,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1045,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1045,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=10)"
          ]
        },
        {
          "name": "test_limit_default_changes_with_max",
          "type": "decorated_definition",
          "line_start": 1050,
          "line_end": 1057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1055,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1055,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1055,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1055,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_LIMIT_MAX=2)"
          ]
        },
        {
          "name": "test_offset_5_usually_appears_5th_in_list",
          "type": "function_definition",
          "line_start": 1061,
          "line_end": 1065,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1063,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1063,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1063,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1063,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_5_moves_after_offset",
          "type": "function_definition",
          "line_start": 1067,
          "line_end": 1071,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1069,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1069,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1069,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1069,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_total_count",
          "type": "function_definition",
          "line_start": 1073,
          "line_end": 1078,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1075,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1075,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1075,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1075,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_offset_not_integer_gives_error",
          "type": "function_definition",
          "line_start": 1080,
          "line_end": 1085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1082,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1082,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1082,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1082,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_issue_3967",
          "type": "function_definition",
          "line_start": 1089,
          "line_end": 1093,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_issue_10411",
          "type": "function_definition",
          "line_start": 1095,
          "line_end": 1098,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1105,
          "line_end": 1112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 1111,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1114,
          "line_end": 1115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "get_page_id_list",
          "type": "function_definition",
          "line_start": 1117,
          "line_end": 1118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "get_homepage",
          "type": "function_definition",
          "line_start": 1120,
          "line_end": 1121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_locale_filter_with_search",
          "type": "decorated_definition",
          "line_start": 1123,
          "line_end": 1137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1124,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1124,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1134,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1134,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1134,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1134,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_translation_of_filter_with_search",
          "type": "decorated_definition",
          "line_start": 1139,
          "line_end": 1152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1140,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1140,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1147,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1147,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1147,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1147,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1151,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1151,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1151,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1151,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_search_for_blog",
          "type": "function_definition",
          "line_start": 1154,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1156,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1156,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1156,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1156,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_type",
          "type": "function_definition",
          "line_start": 1163,
          "line_end": 1168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1165,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1165,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1165,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1165,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_invalid_type",
          "type": "function_definition",
          "line_start": 1170,
          "line_end": 1176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1173,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1173,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1173,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1173,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_filter",
          "type": "function_definition",
          "line_start": 1178,
          "line_end": 1186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1182,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1182,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1182,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1182,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_filter_on_non_filterable_field",
          "type": "function_definition",
          "line_start": 1188,
          "line_end": 1200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1192,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1192,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1192,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1192,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_order",
          "type": "function_definition",
          "line_start": 1202,
          "line_end": 1208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1204,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1204,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1204,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1204,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_with_order_on_non_filterable_field",
          "type": "function_definition",
          "line_start": 1210,
          "line_end": 1222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1214,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1214,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1214,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1214,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_when_disabled_gives_error",
          "type": "decorated_definition",
          "line_start": 1224,
          "line_end": 1230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1227,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1227,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1227,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1227,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILAPI_SEARCH_ENABLED=False)"
          ]
        },
        {
          "name": "test_search_when_filtering_by_tag_gives_error",
          "type": "function_definition",
          "line_start": 1232,
          "line_end": 1242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1236,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1236,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1236,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1236,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_operator_and",
          "type": "function_definition",
          "line_start": 1244,
          "line_end": 1254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1250,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1250,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1250,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1250,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_operator_or",
          "type": "function_definition",
          "line_start": 1256,
          "line_end": 1264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1260,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1260,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1260,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1260,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_searches_work",
          "type": "function_definition",
          "line_start": 1266,
          "line_end": 1271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1268,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1268,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1268,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1268,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1277,
          "line_end": 1280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 1282,
          "line_end": 1387,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 106,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1289,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1289,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1289,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1365,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1382,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1282,
              "description": "Function is 106 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 106 lines (> 37 dynamic threshold)",
                "impact": "Function test_basic is 106 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2961,
          "ai_signals": [
            "High anti-pattern density (0.66)"
          ]
        },
        {
          "name": "test_meta_parent_id_doesnt_show_root_page",
          "type": "function_definition",
          "line_start": 1389,
          "line_end": 1394,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1392,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1392,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1392,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_field_ordering",
          "type": "function_definition",
          "line_start": 1396,
          "line_end": 1432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1400,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1400,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1400,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1400,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1404,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_null_foreign_key",
          "type": "function_definition",
          "line_start": 1434,
          "line_end": 1441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1438,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1438,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1438,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1438,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_with_missing_page_model",
          "type": "function_definition",
          "line_start": 1443,
          "line_end": 1456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1443,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1443,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1446,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_alias_page",
          "type": "function_definition",
          "line_start": 1458,
          "line_end": 1497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1468,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1468,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1468,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1468,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1458,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_alias_page is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_fields_with_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 1501,
          "line_end": 1507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1505,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1505,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1505,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1505,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_remove_fields",
          "type": "function_definition",
          "line_start": 1509,
          "line_end": 1514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1511,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1511,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1511,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1511,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_meta_fields",
          "type": "function_definition",
          "line_start": 1516,
          "line_end": 1521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1517,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1518,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1518,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1518,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1518,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_meta_fields",
          "type": "function_definition",
          "line_start": 1523,
          "line_end": 1531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1528,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1528,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1528,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1528,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_id_field",
          "type": "function_definition",
          "line_start": 1533,
          "line_end": 1538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1535,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1535,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1535,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1535,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_fields",
          "type": "function_definition",
          "line_start": 1540,
          "line_end": 1545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1542,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1542,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1542,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1542,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields",
          "type": "function_definition",
          "line_start": 1547,
          "line_end": 1554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1549,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1549,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1549,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1549,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_nested_fields",
          "type": "function_definition",
          "line_start": 1556,
          "line_end": 1560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1558,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1558,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1558,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1558,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_all_nested_fields",
          "type": "function_definition",
          "line_start": 1562,
          "line_end": 1569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1564,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1564,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1564,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1564,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_remove_all_nested_fields",
          "type": "function_definition",
          "line_start": 1571,
          "line_end": 1575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1573,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1573,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1573,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1573,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_nested_fields",
          "type": "function_definition",
          "line_start": 1577,
          "line_end": 1590,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1579,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1579,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1579,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1579,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1581,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_child_relation_is_list",
          "type": "function_definition",
          "line_start": 1592,
          "line_end": 1596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1594,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1594,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1594,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1594,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_foreign_key",
          "type": "function_definition",
          "line_start": 1598,
          "line_end": 1615,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1600,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1600,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1600,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1600,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1611,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_star_in_wrong_position_gives_error",
          "type": "function_definition",
          "line_start": 1617,
          "line_end": 1624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1619,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1619,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1619,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1619,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unknown_nested_fields_give_error",
          "type": "function_definition",
          "line_start": 1626,
          "line_end": 1631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1628,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1628,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1628,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1628,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_which_are_not_in_api_fields_gives_error",
          "type": "function_definition",
          "line_start": 1633,
          "line_end": 1638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1635,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1635,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1635,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1635,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 1640,
          "line_end": 1645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1642,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1642,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1642,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_fields_remove_unknown_field_gives_error",
          "type": "function_definition",
          "line_start": 1647,
          "line_end": 1652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1649,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1649,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1649,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1649,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nested_fields_on_non_relational_field_gives_error",
          "type": "function_definition",
          "line_start": 1654,
          "line_end": 1659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1656,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1656,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1656,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1656,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_fields_on_form_page",
          "type": "function_definition",
          "line_start": 1661,
          "line_end": 1713,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1672,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1678,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1685,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1685,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1685,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1685,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1694,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1705,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1661,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_form_fields_on_form_page is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response",
          "type": "function_definition",
          "line_start": 1719,
          "line_end": 1720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_without_parameters",
          "type": "function_definition",
          "line_start": 1722,
          "line_end": 1731,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1729,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1729,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1729,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1729,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_id",
          "type": "function_definition",
          "line_start": 1733,
          "line_end": 1740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_find_by_id_nonexistent",
          "type": "function_definition",
          "line_start": 1742,
          "line_end": 1751,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1749,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1749,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1749,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1749,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_html_path",
          "type": "function_definition",
          "line_start": 1753,
          "line_end": 1760,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1754,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_html_path_with_start_and_end_slashes_removed",
          "type": "function_definition",
          "line_start": 1762,
          "line_end": 1769,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1763,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_find_by_html_path_with_fields",
          "type": "function_definition",
          "line_start": 1771,
          "line_end": 1782,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_find_by_html_path_nonexistent",
          "type": "function_definition",
          "line_start": 1784,
          "line_end": 1793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1785,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1791,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1791,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1791,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1791,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1799,
          "line_end": 1800,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "make_stream_page",
          "type": "function_definition",
          "line_start": 1802,
          "line_end": 1804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_can_fetch_streamfield_content",
          "type": "function_definition",
          "line_start": 1806,
          "line_end": 1823,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1813,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1815,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1815,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1815,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1815,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_chooser_block",
          "type": "function_definition",
          "line_start": 1825,
          "line_end": 1834,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1826,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1830,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1830,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1830,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1830,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1833,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_chooser_block_with_custom_get_api_representation",
          "type": "function_definition",
          "line_start": 1836,
          "line_end": 1849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1837,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1843,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1843,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1843,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1843,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1846,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_block",
          "type": "function_definition",
          "line_start": 1851,
          "line_end": 1862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1853,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 1858,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 1858,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1858,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 1858,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1860,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.415,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 1878,
          "line_end": 1881,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 1883,
          "line_end": 1886,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_republish_page_purges",
          "type": "function_definition",
          "line_start": 1888,
          "line_end": 1892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_page_purges",
          "type": "function_definition",
          "line_start": 1894,
          "line_end": 1898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_delete_page_purges",
          "type": "function_definition",
          "line_start": 1900,
          "line_end": 1904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_save_draft_doesnt_purge",
          "type": "function_definition",
          "line_start": 1906,
          "line_end": 1910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_get_queryset",
          "type": "function_definition",
          "line_start": 1916,
          "line_end": 1920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1926,
          "line_end": 1932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        },
        {
          "name": "test_detail_view_does_not_duplicate_queries",
          "type": "function_definition",
          "line_start": 1934,
          "line_end": 1937,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.065,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 171,
        "avg_function_length": 9.75,
        "function_length_stddev": 10.14,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 83,
        "code_lines": 1855,
        "comment_ratio": 0.0428,
        "comment_what_ratio": 0.325,
        "naming_avg_length": 7.57,
        "debug_artifacts": [],
        "ai_smell_count": 638,
        "ai_smell_density": 0.343935,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.11,
        "mechanical": 74.11,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\__init__.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 79,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 7,
        "comment_ratio": 0.125,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.11,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\migrations\\utils.py",
      "language": "python",
      "line_count": 292,
      "token_estimate": 2386,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "should_alter_block",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "map_block_value",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0678,
          "ai_signals": []
        },
        {
          "name": "map_stream_block_value",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 117,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 125,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2428,
          "ai_signals": []
        },
        {
          "name": "map_struct_block_value",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 159,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 167,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2521,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "map_list_block_value",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 200,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1772,
          "ai_signals": []
        },
        {
          "name": "formatted_list_child_generator",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 221,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3595,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "apply_changes_to_raw_data",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 254,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1225,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 30,
        "function_length_stddev": 22.32,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 122,
        "code_lines": 170,
        "comment_ratio": 0.4178,
        "comment_what_ratio": 0.0833,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.041176,
        "structural_uniformity": 0.2559,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.48,
        "mechanical": 75.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\apps.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 71,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.45,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\models.py",
      "language": "python",
      "line_count": 389,
      "token_estimate": 3045,
      "functions": [
        {
          "name": "get_data",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_field_clean_name",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3027,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_form_fields",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_data_fields",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 193,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 200,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_form_parameters",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_landing_page_template",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_submission_class",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "get_submissions_list_view_class",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "process_form_submission",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "render_landing_page",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "serve_submissions_list_view",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 264,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 264,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 275,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 275,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 275,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 275,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "serve_preview",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 298,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 298,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 302,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 302,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_preview_context",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "validate_to_address",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "process_form_submission",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "send_mail",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 353,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0693,
          "ai_signals": []
        },
        {
          "name": "render_email",
          "type": "function_definition",
          "line_start": 355,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 359,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_no_xml_delimiters",
              "severity": "low",
              "line": 374,
              "description": "Long user content without XML delimiters \u2014 Claude performs better with structured input for extraction tasks",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 374,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 8.17,
        "function_length_stddev": 5.34,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 69,
        "code_lines": 320,
        "comment_ratio": 0.1774,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 19,
        "ai_smell_density": 0.059375,
        "structural_uniformity": 0.3467,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.79,
        "mechanical": 82.79,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\utils.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 319,
      "functions": [
        {
          "name": "get_field_clean_name",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 16,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4531,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_types",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1031,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "get_forms_for_user",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3531,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 9,
        "function_length_stddev": 4.36,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 34,
        "comment_ratio": 0.1905,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.65,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.117647,
        "structural_uniformity": 0.5157,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.17,
        "mechanical": 73.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\cloudflare.py",
      "language": "python",
      "line_count": 115,
      "token_estimate": 928,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 26,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 26,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3258,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "_purge_urls",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 74,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 75,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 79,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 85,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 86,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 96,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 98,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 49,
              "description": "Function is 56 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 30 dynamic threshold)",
                "impact": "Function _purge_urls is 56 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge_batch",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 106,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 107,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 109,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 23.75,
        "function_length_stddev": 25.04,
        "import_count": 4,
        "export_count": 1,
        "comment_lines": 2,
        "code_lines": 113,
        "comment_ratio": 0.0174,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.28,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.115044,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 61.38,
        "mechanical": 61.38,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\utils.py",
      "language": "python",
      "line_count": 234,
      "token_estimate": 2353,
      "functions": [
        {
          "name": "get_backends",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 37,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 47,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 14,
              "description": "Function is 41 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 30 dynamic threshold)",
                "impact": "Function get_backends is 41 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4162,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "purge_url_from_cache",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "purge_urls_from_cache",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "_get_page_cached_urls",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "purge_page_from_cache",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "purge_pages_from_cache",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 173,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 174,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 175,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5101,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "add_url",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 191,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5101,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "add_urls",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "add_page",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "add_pages",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 218,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5101,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 223,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4294,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 16.67,
        "function_length_stddev": 11.66,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 117,
        "code_lines": 117,
        "comment_ratio": 0.5,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.24,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.3006,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.18,
        "mechanical": 75.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\filters.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 236,
      "functions": [
        {
          "name": "filter_type",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 34,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0003_make_site_field_editable.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 140,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\permissions.py",
      "language": "python",
      "line_count": 5,
      "token_estimate": 42,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 5,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_redirects.py",
      "language": "python",
      "line_count": 1226,
      "token_estimate": 11537,
      "functions": [
        {
          "name": "test_path_normalisation",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 126,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 25,
              "description": "Function is 126 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 126 lines (> 37 dynamic threshold)",
                "impact": "Function test_path_normalisation is 126 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0705,
          "ai_signals": []
        },
        {
          "name": "test_unicode_path_normalisation",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_route_path_normalisation",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_basic_redirect",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_temporary_redirect",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_without_trailing_slash",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_stripping_query_string",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_to_page",
          "type": "function_definition",
          "line_start": 266,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_to_specific_page_route",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 280,
              "description": "Function is 47 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 22 dynamic threshold)",
                "impact": "Function test_redirect_to_specific_page_route is 47 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1171,
          "ai_signals": []
        },
        {
          "name": "test_redirect_from_any_site",
          "type": "function_definition",
          "line_start": 328,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_from_specific_site",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_without_page_or_link_target",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_to_page_without_site",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_redirects_when_match_is_for_generic",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_redirects_with_query_string_when_match_is_for_generic",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_redirects_when_match_is_for_specific",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_redirects_with_query_string_when_match_is_for_specific_with_qs",
          "type": "function_definition",
          "line_start": 466,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 466,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_duplicate_redirects_with_query_string_when_match_is_for_specific_with_qs is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1324,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_page_redirects_when_match_is_for_specific",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 526,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_with_unicode_in_url",
          "type": "function_definition",
          "line_start": 528,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_redirect_with_encoded_url",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 571,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_encoded_url_case_insensitive",
          "type": "function_definition",
          "line_start": 573,
          "line_end": 594,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_reject_null_characters",
          "type": "function_definition",
          "line_start": 596,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_add_redirect_with_url",
          "type": "function_definition",
          "line_start": 609,
          "line_end": 627,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_add_redirect_with_page",
          "type": "function_definition",
          "line_start": 629,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 652,
          "line_end": 654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 656,
          "line_end": 657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 659,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 662,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 665,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 667,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 668,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 672,
          "line_end": 684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 672,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 672,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 683,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 684,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_results",
          "type": "function_definition",
          "line_start": 686,
          "line_end": 701,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 700,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 701,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 703,
          "line_end": 707,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 705,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_ordering",
          "type": "function_definition",
          "line_start": 709,
          "line_end": 721,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 710,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 721,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_orderings",
          "type": "function_definition",
          "line_start": 723,
          "line_end": 752,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 735,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 739,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 747,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 750,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtering_by_type",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 761,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_filtering_by_site",
          "type": "function_definition",
          "line_start": 763,
          "line_end": 772,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 774,
          "line_end": 790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 792,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_num_queries_in_export",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 811,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.276,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 836,
          "line_end": 838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 840,
          "line_end": 841,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 843,
          "line_end": 844,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 846,
          "line_end": 849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 849,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 851,
          "line_end": 876,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 851,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_add_with_site",
          "type": "function_definition",
          "line_start": 878,
          "line_end": 899,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_add_validation_error",
          "type": "function_definition",
          "line_start": 901,
          "line_end": 914,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_cannot_add_duplicate_with_no_site",
          "type": "function_definition",
          "line_start": 916,
          "line_end": 932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_cannot_add_duplicate_on_same_site",
          "type": "function_definition",
          "line_start": 934,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_can_reuse_path_on_other_site",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 980,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_add_long_redirect",
          "type": "function_definition",
          "line_start": 982,
          "line_end": 1005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1016,
          "line_end": 1026,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1028,
          "line_end": 1032,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1034,
          "line_end": 1038,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1040,
          "line_end": 1054,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1043,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1046,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1047,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1049,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonexistent_redirect",
          "type": "function_definition",
          "line_start": 1056,
          "line_end": 1057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 1059,
          "line_end": 1081,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_site",
          "type": "function_definition",
          "line_start": 1083,
          "line_end": 1106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_edit_validation_error",
          "type": "function_definition",
          "line_start": 1108,
          "line_end": 1121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_edit_duplicate",
          "type": "function_definition",
          "line_start": 1123,
          "line_end": 1139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_get_with_no_permission",
          "type": "function_definition",
          "line_start": 1141,
          "line_end": 1154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2927,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_get_with_edit_permission_only",
          "type": "function_definition",
          "line_start": 1156,
          "line_end": 1172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1161,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1165,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1172,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1183,
          "line_end": 1193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1195,
          "line_end": 1199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1201,
          "line_end": 1204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1206,
          "line_end": 1209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1209,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3927,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonexistent_redirect",
          "type": "function_definition",
          "line_start": 1211,
          "line_end": 1212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 1214,
          "line_end": 1225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0427,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 66,
        "avg_function_length": 16.7,
        "function_length_stddev": 16.67,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 104,
        "code_lines": 1122,
        "comment_ratio": 0.0848,
        "comment_what_ratio": 0.2115,
        "naming_avg_length": 7.16,
        "debug_artifacts": [],
        "ai_smell_count": 31,
        "ai_smell_density": 0.027629,
        "structural_uniformity": 0.0019,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.98,
        "mechanical": 89.98,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\wagtail_hooks.py",
      "language": "python",
      "line_count": 56,
      "token_estimate": 380,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "register_redirects_menu_item",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        },
        {
          "name": "register_permissions",
          "type": "decorated_definition",
          "line_start": 42,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4857,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6,
        "function_length_stddev": 2.16,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 56,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.46,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.017857,
        "structural_uniformity": 0.64,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.54,
        "mechanical": 95.54,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\admin_urls.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 246,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.34,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0003_query_querydailyhits.py",
      "language": "python",
      "line_count": 59,
      "token_estimate": 445,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 58,
        "comment_ratio": 0.0169,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\static_src\\wagtailsearchpromotions\\js\\query-chooser-modal.js",
      "language": "javascript",
      "line_count": 75,
      "token_estimate": 454,
      "functions": [
        {
          "name": "ajaxifyLinks",
          "type": "function_declaration",
          "line_start": 3,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 7,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 7 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            }
          ],
          "ai_confidence": 0.4368,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "search",
          "type": "function_declaration",
          "line_start": 16,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0868,
          "ai_signals": []
        },
        {
          "name": "setPage",
          "type": "function_declaration",
          "line_start": 31,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0868,
          "ai_signals": []
        },
        {
          "name": "chooseQuery",
          "type": "function_declaration",
          "line_start": 54,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0868,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 13.25,
        "function_length_stddev": 7.5,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 75,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.22,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.013333,
        "structural_uniformity": 0.434,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.32,
        "mechanical": 94.32,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\views\\settings.py",
      "language": "python",
      "line_count": 261,
      "token_estimate": 2400,
      "functions": [
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 83,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "save_searchpicks",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 129,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 142,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 147,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 154,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 158,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 125,
              "description": "Function is 36 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 36 lines (> 30 dynamic threshold)",
                "impact": "Function save_searchpicks is 36 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "searchpicks_formset",
          "type": "decorated_definition",
          "line_start": 162,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "delete_action",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 211,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "chooser",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 241,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 216,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function chooser is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1974,
          "ai_signals": []
        },
        {
          "name": "chooserresults",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 12,
        "function_length_stddev": 13.05,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 246,
        "comment_ratio": 0.0575,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 8.91,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.044715,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.05,
        "mechanical": 83.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\registry.py",
      "language": "python",
      "line_count": 148,
      "token_estimate": 1183,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "construct_edit_url",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "construct_edit_url",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 52,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 63,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 63,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 63,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 85,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 117,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 117,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 117,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 63,
              "description": "Function is 57 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 30 dynamic threshold)",
                "impact": "Function register is 57 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_decorator",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 121,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 121,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 121,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 126,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 126,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 126,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 127,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 127,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 127,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 129,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 131,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 137,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 137,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 137,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 138,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.25,
        "function_length_stddev": 17.88,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 132,
        "comment_ratio": 0.1081,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.25,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.212121,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.35,
        "mechanical": 70.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\generic\\test_templates.py",
      "language": "python",
      "line_count": 198,
      "token_estimate": 1812,
      "functions": [
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_accessing_setting",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_model_case_insensitive",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_models_cached",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3719,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_no_context_processor",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_request_context",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_no_request",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_variable_assignment_request_context",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_accessing_setting",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_model_case_insensitive",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        },
        {
          "name": "test_models_cached",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 178,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3865,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_settings_no_request",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1532,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 11.64,
        "function_length_stddev": 5.64,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 25,
        "code_lines": 173,
        "comment_ratio": 0.1263,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.011561,
        "structural_uniformity": 0.5158,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.62,
        "mechanical": 94.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\site_specific\\test_templates.py",
      "language": "python",
      "line_count": 318,
      "token_estimate": 2867,
      "functions": [
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_accessing_setting",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_multi_site",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_model_case_insensitive",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_models_cached",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 73,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3577,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_no_context_processor",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_request_context",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_request_context_use_default",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_use_default",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_no_request_no_default",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_variable_assignment_request_context",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_get_settings_variable_assignment_use_default",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_accessing_setting",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_multi_site",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_model_case_insensitive",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_models_cached",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 266,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3723,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_settings_use_default_site_override",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_settings_use_default_site",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        },
        {
          "name": "test_settings_no_request_no_use_default",
          "type": "function_definition",
          "line_start": 306,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.139,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 13.24,
        "function_length_stddev": 5.06,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 58,
        "code_lines": 260,
        "comment_ratio": 0.1824,
        "comment_what_ratio": 0.0769,
        "naming_avg_length": 7.69,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.007692,
        "structural_uniformity": 0.6179,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.22,
        "mechanical": 95.22,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\wagtail_hooks.py",
      "language": "python",
      "line_count": 136,
      "token_estimate": 1274,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3151,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "register_submit_translation_permission",
          "type": "decorated_definition",
          "line_start": 41,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 44,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        },
        {
          "name": "page_listing_more_buttons",
          "type": "decorated_definition",
          "line_start": 48,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1693,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_listing_more_buttons\")"
          ]
        },
        {
          "name": "page_header_buttons",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1693,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_page_header_buttons\")"
          ]
        },
        {
          "name": "register_snippet_listing_buttons",
          "type": "decorated_definition",
          "line_start": 96,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 113,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3443,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_snippet_listing_buttons\")"
          ]
        },
        {
          "name": "construct_translated_pages_to_cascade_actions",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 126,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 132,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5193,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"construct_translated_pages_to_cascade_actions\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 18.5,
        "function_length_stddev": 6.95,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 127,
        "comment_ratio": 0.0662,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 8.99,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.03937,
        "structural_uniformity": 0.6243,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.61,
        "mechanical": 87.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\styleguide\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 63,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.79,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\coreutils.py",
      "language": "python",
      "line_count": 619,
      "token_estimate": 5497,
      "functions": [
        {
          "name": "camelcase_to_underscore",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "string_to_ascii",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_model_string",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 55,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "resolve_model_string",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 72,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 73,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 76,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 81,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 85,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 85,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 85,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "cautious_slugify",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "safe_snake_case",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_content_type_label",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 145,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "accepts_kwarg",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 169,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__getattr__",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__getstate__",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__setstate__",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "find_available_slug",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_content_languages",
          "type": "decorated_definition",
          "line_start": 241,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 254,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 261,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 272,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 241,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function get_content_languages is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3581,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ],
          "decorators": [
            "functools.cache"
          ]
        },
        {
          "name": "get_supported_content_language_variant",
          "type": "decorated_definition",
          "line_start": 284,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 303,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 309,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 314,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3255,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ],
          "decorators": [
            "functools.lru_cache(maxsize=1000)"
          ]
        },
        {
          "name": "get_locales_display_names",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "reset_cache",
          "type": "decorated_definition",
          "line_start": 337,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": [],
          "decorators": [
            "receiver(setting_changed)"
          ]
        },
        {
          "name": "multigetattr",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 3
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 360,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 365,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 368,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 347,
              "description": "Function is 45 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 30 dynamic threshold)",
                "impact": "Function multigetattr is 45 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3278,
          "ai_signals": [
            "High anti-pattern density (0.89)"
          ]
        },
        {
          "name": "get_dummy_request",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 403,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 403,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 405,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 405,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 406,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 406,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 408,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 408,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 410,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 410,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 411,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 411,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 414,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 414,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "safe_md5",
          "type": "function_definition",
          "line_start": 417,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 449,
          "line_end": 450,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "add",
          "type": "function_definition",
          "line_start": 452,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 452,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extend",
          "type": "function_definition",
          "line_start": 458,
          "line_end": 460,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 459,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 460,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "process",
          "type": "function_definition",
          "line_start": 462,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "pre_process",
          "type": "function_definition",
          "line_start": 468,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "_do_processing",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "post_process",
          "type": "function_definition",
          "line_start": 482,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 510,
          "line_end": 517,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "initialize_instance",
          "type": "function_definition",
          "line_start": 519,
          "line_end": 520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 520,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 520,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "add",
          "type": "function_definition",
          "line_start": 522,
          "line_end": 528,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 522,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extend",
          "type": "function_definition",
          "line_start": 530,
          "line_end": 535,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 531,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 533,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 535,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_do_processing",
          "type": "function_definition",
          "line_start": 537,
          "line_end": 547,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_summary",
          "type": "function_definition",
          "line_start": 549,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "make_wagtail_template_fragment_key",
          "type": "function_definition",
          "line_start": 554,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_js_regex",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 618,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 567,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 589,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 608,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 565,
              "description": "Function is 54 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 30 dynamic threshold)",
                "impact": "Function get_js_regex is 54 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2759,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 36,
        "avg_function_length": 13.14,
        "function_length_stddev": 13.49,
        "import_count": 28,
        "export_count": 0,
        "comment_lines": 211,
        "code_lines": 408,
        "comment_ratio": 0.3409,
        "comment_what_ratio": 0.0833,
        "naming_avg_length": 7.05,
        "debug_artifacts": [],
        "ai_smell_count": 51,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.2,
        "mechanical": 70.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\api\\v2\\serializers.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 154,
      "functions": [
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 18,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0002_initial_data.py",
      "language": "python",
      "line_count": 67,
      "token_estimate": 566,
      "functions": [
        {
          "name": "add_document_permissions_to_admin_groups",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.527,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_document_permissions",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 41,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 41,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 42,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 42,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.527,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 23,
        "function_length_stddev": 14.14,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 62,
        "comment_ratio": 0.0746,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 9.82,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.209677,
        "structural_uniformity": 0.3851,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.35,
        "mechanical": 68.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0009_document_verbose_name_plural.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 102,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 17,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.15,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\permissions.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 79,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 16.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_blocks.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 258,
      "functions": [
        {
          "name": "test_deconstruct",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0869,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 10,
        "function_length_stddev": 5.66,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.8,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.4343,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.33,
        "mechanical": 83.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_form_overrides.py",
      "language": "python",
      "line_count": 96,
      "token_estimate": 937,
      "functions": [
        {
          "name": "test_get_document_base_form",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": []
        },
        {
          "name": "test_get_document_form",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": []
        },
        {
          "name": "test_get_document_form_widgets",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": []
        },
        {
          "name": "test_tags_widget_with_custom_tag_model",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 34,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 34,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4013,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tags_longer_than_max_characters",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": []
        },
        {
          "name": "test_overridden_base_form",
          "type": "decorated_definition",
          "line_start": 62,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_DOCUMENT_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateDocumentForm\"\n    )"
          ]
        },
        {
          "name": "test_get_overridden_document_form",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_DOCUMENT_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateDocumentForm\"\n    )"
          ]
        },
        {
          "name": "test_get_overridden_document_multi_form",
          "type": "decorated_definition",
          "line_start": 76,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_DOCUMENT_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateDocumentForm\"\n    )"
          ]
        },
        {
          "name": "test_get_overridden_document_form_widgets",
          "type": "decorated_definition",
          "line_start": 84,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0513,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILDOCS_DOCUMENT_FORM_BASE=\"wagtail.test.testapp.media_forms.AlternateDocumentForm\"\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 7.67,
        "function_length_stddev": 5.7,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 96,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.82,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.020833,
        "structural_uniformity": 0.2564,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.79,
        "mechanical": 94.79,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\urls.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 85,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 13,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\documents.py",
      "language": "python",
      "line_count": 348,
      "token_estimate": 3055,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 92,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 92,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "needs_usage_count_subquery",
          "type": "decorated_definition",
          "line_start": 97,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 98,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 98,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "current_collection",
          "type": "decorated_definition",
          "line_start": 103,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 108,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 114,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 119,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 122,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 128,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 137,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "collections",
          "type": "decorated_definition",
          "line_start": 141,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_next_url",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "decorate_paginated_queryset",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 184,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3208,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 206,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 207,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 207,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 210,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 210,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_initial_form_instance",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 221,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 221,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 240,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 241,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 241,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 242,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 242,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3792,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "next_url",
          "type": "decorated_definition",
          "line_start": 265,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 269,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_delete_url",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "confirmation_message",
          "type": "decorated_definition",
          "line_start": 316,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0292,
          "ai_signals": []
        },
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 5,
              "description": "Unused import: from django.http.response import HttpResponse as HttpResponse",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'HttpResponse' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from django.http.response import HttpResponse as HttpResponse",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 34,
        "avg_function_length": 6,
        "function_length_stddev": 5.5,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 332,
        "comment_ratio": 0.046,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 8.73,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.063253,
        "structural_uniformity": 0.0834,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.86,
        "mechanical": 82.86,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\embeds.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 593,
      "functions": [
        {
          "name": "get_finder_for_embed",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 13,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4569,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_embed",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 3
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 40,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 45,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 23,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function get_embed is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3511,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "get_embed_hash",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1069,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 20.33,
        "function_length_stddev": 19.63,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 68,
        "comment_ratio": 0.1169,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.32,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.058824,
        "structural_uniformity": 0.0346,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.36,
        "mechanical": 71.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\format.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 216,
      "functions": [
        {
          "name": "embed_to_frontend_html",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 18,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4161,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Suspiciously uniform function lengths (0.83)"
          ]
        },
        {
          "name": "embed_to_editor_html",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1661,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12.5,
        "function_length_stddev": 2.12,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 30,
        "comment_ratio": 0.1176,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.83,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.033333,
        "structural_uniformity": 0.8303,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.42,
        "mechanical": 89.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0007_populate_hash.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 370,
      "functions": [
        {
          "name": "migrate_forwards",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 12,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 14,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 16,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 18,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 21,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 23,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 24,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 25,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 26,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 29,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 30,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 34,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 44,
        "comment_ratio": 0.1538,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.55,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.318182,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 51.8,
        "mechanical": 51.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\rich_text\\editor_html.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 335,
      "functions": [
        {
          "name": "get_db_attributes",
          "type": "decorated_definition",
          "line_start": 18,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1865,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 29,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 37,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5047,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Suspiciously uniform function lengths (0.93)"
          ],
          "decorators": [
            "staticmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 10.5,
        "function_length_stddev": 0.71,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 24,
        "comment_ratio": 0.4419,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.25,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.041667,
        "structural_uniformity": 0.9327,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.43,
        "mechanical": 89.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\urls.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 62,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\__init__.py",
      "language": "python",
      "line_count": 35,
      "token_estimate": 312,
      "functions": [
        {
          "name": "get_image_model_string",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0586,
          "ai_signals": []
        },
        {
          "name": "get_image_model",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 14,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 14,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 25,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 25,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 26,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 28,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 30,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4086,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 14,
        "function_length_stddev": 9.9,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 24,
        "comment_ratio": 0.3143,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.291667,
        "structural_uniformity": 0.2929,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.3,
        "mechanical": 72.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\exceptions.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 54,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 8,
        "comment_ratio": 0.2727,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\management\\commands\\wagtail_update_image_renditions.py",
      "language": "python",
      "line_count": 101,
      "token_estimate": 862,
      "functions": [
        {
          "name": "progress_bar",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "python-bare-except",
              "severity": "high",
              "line": 86,
              "description": "Bare except \u2014 catches all exceptions including SystemExit",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Bare except \u2014 catches all exceptions including SystemExit",
                "impact": "Bare except at line 86 catches all exceptions including SystemExit and KeyboardInterrupt",
                "recommendation": "Catch a specific exception type, or at minimum use 'except Exception'",
                "confidence": 1.0,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 41,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 41,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 48,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 69,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 87,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 40,
              "description": "Function is 61 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 22 dynamic threshold)",
                "impact": "Function handle is 61 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 27.33,
        "function_length_stddev": 29.19,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 96,
        "comment_ratio": 0.0495,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 7.43,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.072917,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 68.41,
        "mechanical": 68.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0007_image_file_size.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 91,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0015_fill_filter_spec_field.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 107,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 16,
        "comment_ratio": 0.0588,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0023_add_choose_permissions.py",
      "language": "python",
      "line_count": 103,
      "token_estimate": 905,
      "functions": [
        {
          "name": "add_choose_permission_to_admin_groups",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 18,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 26,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 27,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_choose_permission",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 32,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 32,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 33,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 33,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 40,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_choose_permission",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 46,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 46,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 53,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "copy_choose_permission_to_collections",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 58,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 58,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 59,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 59,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 66,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_choose_permission_from_collections",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 73,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 73,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 12.6,
        "function_length_stddev": 6.11,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 95,
        "comment_ratio": 0.0777,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 9.73,
        "debug_artifacts": [],
        "ai_smell_count": 31,
        "ai_smell_density": 0.326316,
        "structural_uniformity": 0.5153,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.82,
        "mechanical": 69.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\rect.py",
      "language": "python",
      "line_count": 203,
      "token_estimate": 1450,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 7,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_get_size",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_set_size",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "width",
          "type": "decorated_definition",
          "line_start": 41,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "height",
          "type": "decorated_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "_get_centroid",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_set_centroid",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "x",
          "type": "decorated_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "y",
          "type": "decorated_definition",
          "line_start": 65,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "centroid_x",
          "type": "decorated_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "centroid_y",
          "type": "decorated_definition",
          "line_start": 74,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "as_tuple",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "clone",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "round",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "move_to_clamp",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "move_to_cover",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "transform",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "from_point",
          "type": "decorated_definition",
          "line_start": 195,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 27,
        "avg_function_length": 6.15,
        "function_length_stddev": 7.02,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 184,
        "comment_ratio": 0.0936,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.66,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.04,
        "mechanical": 99.04,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_admin_views.py",
      "language": "python",
      "line_count": 4671,
      "token_estimate": 44062,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 76,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_q",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 87,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 97,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination_preserves_other_params",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 101,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 101,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 105,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 115,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order_by_title",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 131,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_valid_orderings",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 146,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 150,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_ordering_used_if_invalid_ordering_provided",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 157,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_entries_per_page",
          "type": "decorated_definition",
          "line_start": 163,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 177,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3523,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_INDEX_PAGE_SIZE=15)"
          ]
        },
        {
          "name": "test_default_entries_per_page_uses_default",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 195,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3652,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_collection_order",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 204,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3409,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_collection_nesting",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 223,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_image_link_contains_next_url",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_tags",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 248,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 253,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 273,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 279,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 285,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 290,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 294,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 298,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 302,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 304,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 307,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 263,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_tag_filtering is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering_preserves_other_params",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 324,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 324,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 325,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 331,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_form_rendered",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 350,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "decorated_definition",
          "line_start": 361,
          "line_end": 387,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 374,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2761,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\"default\": {\"BACKEND\": \"django.core.cache.backends.dummy.DummyCache\"}}\n    )"
          ]
        },
        {
          "name": "test_empty_tag_filter_does_not_perform_id_filtering",
          "type": "function_definition",
          "line_start": 389,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 394,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3131,
          "ai_signals": []
        },
        {
          "name": "test_correct_layout_is_passed_to_context",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 414,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 418,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 422,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_layout_when_layout_is_list",
          "type": "function_definition",
          "line_start": 424,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 427,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3798,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_layout_when_layout_is_grid",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 443,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3798,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_layout_when_no_layout_is_passed",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 459,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3652,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_layout_when_layout_is_invalid",
          "type": "function_definition",
          "line_start": 473,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 478,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3409,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_image_is_present_in_image_preview_column",
          "type": "function_definition",
          "line_start": 492,
          "line_end": 506,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 495,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3798,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_title_and_filename_are_present_in_title_column",
          "type": "function_definition",
          "line_start": 508,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 511,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2811,
          "ai_signals": []
        },
        {
          "name": "test_list_layout_contains_required_table_headers",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 549,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 538,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 544,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_layout_toggle_button_in_list_layout",
          "type": "function_definition",
          "line_start": 551,
          "line_end": 559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 554,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 556,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_layout_toggle_button_in_grid_layout",
          "type": "function_definition",
          "line_start": 561,
          "line_end": 569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 564,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 566,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_count_column",
          "type": "function_definition",
          "line_start": 571,
          "line_end": 593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 577,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2986,
          "ai_signals": []
        },
        {
          "name": "test_order_by_usage_count",
          "type": "function_definition",
          "line_start": 595,
          "line_end": 624,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 605,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 606,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 620,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filter_by_usage_count",
          "type": "function_definition",
          "line_start": 626,
          "line_end": 664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 652,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 662,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 626,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_filter_by_usage_count is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_bulk_action_rendered",
          "type": "function_definition",
          "line_start": 666,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 670,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 671,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 677,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 682,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get_header_context_data_with_current_collection",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get_header_context_data_without_current_collection",
          "type": "function_definition",
          "line_start": 700,
          "line_end": 711,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 718,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 735,
          "line_end": 736,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 738,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 738,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 738,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 741,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_partial_match",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 748,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_collection_query_search",
          "type": "function_definition",
          "line_start": 752,
          "line_end": 785,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 752,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 752,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 760,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 770,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 771,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 772,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 777,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_and_order_by_created_at",
          "type": "function_definition",
          "line_start": 787,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 796,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 798,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 801,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tag_filtering_with_search_term",
          "type": "function_definition",
          "line_start": 807,
          "line_end": 828,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 817,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 823,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 828,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_search_when_layout_is_list",
          "type": "function_definition",
          "line_start": 830,
          "line_end": 847,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 835,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3409,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_image_search_when_layout_is_grid",
          "type": "function_definition",
          "line_start": 849,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 854,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3409,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_order_by_usage_count_disabled_when_searching",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 880,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 887,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4265,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 899,
          "line_end": 900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 902,
          "line_end": 903,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 905,
          "line_end": 917,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 905,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 905,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 921,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 924,
          "line_end": 925,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 927,
          "line_end": 928,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 930,
          "line_end": 973,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 933,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 939,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 946,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 950,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 951,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 953,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 956,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 972,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 930,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collections",
          "type": "function_definition",
          "line_start": 975,
          "line_end": 987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 981,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 985,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collection_nesting",
          "type": "function_definition",
          "line_start": 989,
          "line_end": 996,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 995,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_custom_image_model",
          "type": "decorated_definition",
          "line_start": 998,
          "line_end": 1011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 999,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 999,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1002,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1011,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 1013,
          "line_end": 1041,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1013,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2671,
          "ai_signals": []
        },
        {
          "name": "test_add_svg_denied",
          "type": "function_definition",
          "line_start": 1043,
          "line_end": 1063,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1060,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3131,
          "ai_signals": []
        },
        {
          "name": "test_add_svg",
          "type": "decorated_definition",
          "line_start": 1065,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_EXTENSIONS=[\"svg\"])"
          ]
        },
        {
          "name": "test_add_temporary_uploaded_file",
          "type": "function_definition",
          "line_start": 1085,
          "line_end": 1121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1091,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mediagen_no_watermark",
              "severity": "medium",
              "line": 1093,
              "description": "AI-generated content served without watermarking -- violates AI transparency best practices and regulations",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3356,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_add_with_external_file_storage",
          "type": "decorated_definition",
          "line_start": 1123,
          "line_end": 1145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_add_no_file_selected",
          "type": "function_definition",
          "line_start": 1147,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1156,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1160,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_too_large_file",
          "type": "decorated_definition",
          "line_start": 1163,
          "line_end": 1186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1176,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1180,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_MAX_UPLOAD_SIZE=1)"
          ]
        },
        {
          "name": "test_add_too_many_pixels",
          "type": "decorated_definition",
          "line_start": 1188,
          "line_end": 1208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1201,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1205,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4798,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_MAX_IMAGE_PIXELS=1)"
          ]
        },
        {
          "name": "test_add_with_collections",
          "type": "function_definition",
          "line_start": 1210,
          "line_end": 1233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_add_with_selected_collection",
          "type": "function_definition",
          "line_start": 1235,
          "line_end": 1245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_unique_together_validation_error",
          "type": "decorated_definition",
          "line_start": 1247,
          "line_end": 1276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1271,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2631,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1280,
          "line_end": 1304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1282,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1282,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1285,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1292,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1302,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1306,
          "line_end": 1307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1309,
          "line_end": 1310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 1312,
          "line_end": 1322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1315,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1321,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_collection_nesting",
          "type": "function_definition",
          "line_start": 1324,
          "line_end": 1335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1332,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1334,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 1337,
          "line_end": 1356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1337,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3215,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1360,
          "line_end": 1369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "update_from_db",
          "type": "function_definition",
          "line_start": 1371,
          "line_end": 1372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1374,
          "line_end": 1377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1379,
          "line_end": 1382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1384,
          "line_end": 1403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1387,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1395,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1399,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1400,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_with_collection_nesting",
          "type": "function_definition",
          "line_start": 1405,
          "line_end": 1412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1411,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_next_url_is_present_in_edit_form",
          "type": "function_definition",
          "line_start": 1414,
          "line_end": 1434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_with_usage_count",
          "type": "function_definition",
          "line_start": 1436,
          "line_end": 1442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1439,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_with_external_storage",
          "type": "decorated_definition",
          "line_start": 1444,
          "line_end": 1462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1462,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3307,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 1464,
          "line_end": 1479,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_next_url",
          "type": "function_definition",
          "line_start": 1481,
          "line_end": 1506,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_limited_permissions",
          "type": "function_definition",
          "line_start": 1508,
          "line_end": 1525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1512,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3409,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_edit_with_new_image_file",
          "type": "function_definition",
          "line_start": 1527,
          "line_end": 1547,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_new_image_file_and_external_storage",
          "type": "decorated_definition",
          "line_start": 1549,
          "line_end": 1577,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_with_missing_image_file",
          "type": "function_definition",
          "line_start": 1579,
          "line_end": 1584,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1584,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_get_missing_file_displays_warning",
          "type": "function_definition",
          "line_start": 1586,
          "line_end": 1594,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1593,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_missing_file_displays_warning_with_default_storage",
          "type": "function_definition",
          "line_start": 1596,
          "line_end": 1597,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get_missing_file_displays_warning_with_custom_storage",
          "type": "decorated_definition",
          "line_start": 1599,
          "line_end": 1608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "get_content",
          "type": "function_definition",
          "line_start": 1610,
          "line_end": 1618,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_reupload_same_name",
          "type": "function_definition",
          "line_start": 1620,
          "line_end": 1658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1620,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_reupload_same_name is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2362,
          "ai_signals": []
        },
        {
          "name": "test_reupload_different_name",
          "type": "function_definition",
          "line_start": 1660,
          "line_end": 1698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1660,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_reupload_different_name is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2362,
          "ai_signals": []
        },
        {
          "name": "test_no_thousand_separators_in_focal_point_editor",
          "type": "decorated_definition",
          "line_start": 1700,
          "line_end": 1717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1707,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1708,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1713,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1716,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 1717,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)"
          ]
        },
        {
          "name": "test_unique_together_validation_error",
          "type": "decorated_definition",
          "line_start": 1719,
          "line_end": 1749,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1744,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2594,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1754,
          "line_end": 1763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1765,
          "line_end": 1768,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get_with_custom_image_model",
          "type": "function_definition",
          "line_start": 1770,
          "line_end": 1779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1770,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1770,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1773,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1779,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1783,
          "line_end": 1792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1794,
          "line_end": 1795,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1797,
          "line_end": 1798,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1800,
          "line_end": 1814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1803,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1804,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 1816,
          "line_end": 1822,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1819,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 1824,
          "line_end": 1838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1836,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1836,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_with_limited_permissions",
          "type": "function_definition",
          "line_start": 1840,
          "line_end": 1850,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1844,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4646,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 1852,
          "line_end": 1874,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1857,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1858,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4508,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 1876,
          "line_end": 1881,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1885,
          "line_end": 1892,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_usage_page",
          "type": "function_definition",
          "line_start": 1894,
          "line_end": 1914,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1914,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3131,
          "ai_signals": []
        },
        {
          "name": "test_usage_page_no_usage",
          "type": "function_definition",
          "line_start": 1916,
          "line_end": 1921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_usage_no_tags",
          "type": "function_definition",
          "line_start": 1923,
          "line_end": 1932,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1926,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_page_with_only_change_permission",
          "type": "function_definition",
          "line_start": 1934,
          "line_end": 1978,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1954,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1954,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1957,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1965,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1967,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1978,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1934,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_usage_page_with_only_change_permission is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_page_without_change_permission",
          "type": "function_definition",
          "line_start": 1980,
          "line_end": 2006,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 1986,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1986,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1989,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1997,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1999,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2010,
          "line_end": 2011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2013,
          "line_end": 2014,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2016,
          "line_end": 2051,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2019,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2019,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2019,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2019,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2021,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2024,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2024,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2026,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2027,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2029,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2034,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2039,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2050,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple_with_collection_nesting",
          "type": "function_definition",
          "line_start": 2053,
          "line_end": 2060,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2059,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_upload_field_accepts_heic",
          "type": "decorated_definition",
          "line_start": 2062,
          "line_end": 2077,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2068,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2068,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2068,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2068,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2070,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2072,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2073,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2076,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_EXTENSIONS=[\"gif\", \"jpg\", \"jpeg\", \"png\", \"webp\", \"avif\", \"heic\"]\n    )"
          ]
        },
        {
          "name": "test_upload_field_without_avif",
          "type": "decorated_definition",
          "line_start": 2079,
          "line_end": 2088,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2083,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2083,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2083,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2083,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2085,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2087,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2088,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_EXTENSIONS=[\"gif\", \"jpg\", \"jpeg\", \"png\", \"webp\"])"
          ]
        },
        {
          "name": "test_choose_permissions",
          "type": "function_definition",
          "line_start": 2090,
          "line_end": 2161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2094,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2096,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2104,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2113,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2131,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2146,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2146,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2153,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2090,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_choose_permissions is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_custom_image_model",
          "type": "decorated_definition",
          "line_start": 2163,
          "line_end": 2177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2164,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2164,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2167,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2167,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2167,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2169,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2173,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2177,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2177,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 2179,
          "line_end": 2182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 2179,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2179,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2182,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 2184,
          "line_end": 2190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_chooser_page_size",
          "type": "decorated_definition",
          "line_start": 2192,
          "line_end": 2206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_CHOOSER_PAGE_SIZE=4)"
          ]
        },
        {
          "name": "test_filter_by_tag",
          "type": "function_definition",
          "line_start": 2208,
          "line_end": 2224,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2209,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2215,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_queryset_hook_browse",
          "type": "function_definition",
          "line_start": 2226,
          "line_end": 2245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2244,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2245,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_list_mode",
          "type": "function_definition",
          "line_start": 2247,
          "line_end": 2277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2261,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2261,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2261,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2261,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2263,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2265,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "decorated_definition",
          "line_start": 2279,
          "line_end": 2305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2288,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2761,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\"default\": {\"BACKEND\": \"django.core.cache.backends.dummy.DummyCache\"}}\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2312,
          "line_end": 2313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2315,
          "line_end": 2316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_construct_queryset_hook_search",
          "type": "function_definition",
          "line_start": 2318,
          "line_end": 2337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 2318,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2318,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2336,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2341,
          "line_end": 2349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2351,
          "line_end": 2354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2356,
          "line_end": 2368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2360,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2360,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2360,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2360,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_multiple_flag",
          "type": "function_definition",
          "line_start": 2370,
          "line_end": 2385,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2375,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2375,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2375,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2375,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2389,
          "line_end": 2408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2410,
          "line_end": 2418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 2420,
          "line_end": 2430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2424,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2424,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2424,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2424,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 2427,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 2429,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2434,
          "line_end": 2441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2443,
          "line_end": 2447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 2449,
          "line_end": 2453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2455,
          "line_end": 2460,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2458,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2458,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2458,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2458,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2460,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_edit_params",
          "type": "function_definition",
          "line_start": 2462,
          "line_end": 2468,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_with_edit_params_no_alt_text_marks_as_decorative",
          "type": "function_definition",
          "line_start": 2470,
          "line_end": 2475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_post_response",
          "type": "function_definition",
          "line_start": 2477,
          "line_end": 2497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2489,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2489,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2489,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2489,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2497,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_response_image_is_decorative_discards_alt_text",
          "type": "function_definition",
          "line_start": 2499,
          "line_end": 2511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2507,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2507,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2507,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2507,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2511,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_response_image_is_not_decorative_missing_alt_text",
          "type": "function_definition",
          "line_start": 2513,
          "line_end": 2525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2521,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2521,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2521,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2521,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2524,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2529,
          "line_end": 2530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2532,
          "line_end": 2533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2535,
          "line_end": 2542,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2539,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2541,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2541,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2541,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2541,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_upload",
          "type": "function_definition",
          "line_start": 2544,
          "line_end": 2569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_model_no_labels",
              "severity": "low",
              "line": 2544,
              "description": "Vertex model deployed without labels \u2014 hard to track costs",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2811,
          "ai_signals": []
        },
        {
          "name": "test_upload_no_file_selected",
          "type": "function_definition",
          "line_start": 2571,
          "line_end": 2588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2582,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2587,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_upload_duplicate",
          "type": "function_definition",
          "line_start": 2590,
          "line_end": 2644,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2609,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2613,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2613,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2616,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2617,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2623,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2638,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2643,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2643,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2643,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2643,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2590,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_upload_duplicate is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_upload_duplicate_select_format",
          "type": "function_definition",
          "line_start": 2646,
          "line_end": 2697,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2666,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2666,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2675,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2691,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2696,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2696,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2696,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2646,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_upload_duplicate_select_format is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_select_format_flag_after_upload_form_error",
          "type": "function_definition",
          "line_start": 2699,
          "line_end": 2724,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2713,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2716,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4157,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_select_format_flag_after_upload_form_error_bad_extension",
          "type": "function_definition",
          "line_start": 2726,
          "line_end": 2754,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2743,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2746,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3878,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "test_upload_with_external_storage",
          "type": "decorated_definition",
          "line_start": 2756,
          "line_end": 2779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        STORAGES={\n            **settings.STORAGES,\n            \"default\": {\n                \"BACKEND\": \"wagtail.test.dummy_external_storage.DummyExternalStorage\"\n            },\n        },\n    )"
          ]
        },
        {
          "name": "test_unique_together_validation",
          "type": "decorated_definition",
          "line_start": 2781,
          "line_end": 2812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2806,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2558,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILIMAGES_IMAGE_MODEL=\"tests.CustomImage\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2816,
          "line_end": 2840,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2818,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2818,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2821,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2828,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2838,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 2842,
          "line_end": 2854,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2846,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2853,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_chooser",
          "type": "function_definition",
          "line_start": 2856,
          "line_end": 2866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2859,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2865,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 2868,
          "line_end": 2891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2868,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2923,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2899,
          "line_end": 2906,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 2908,
          "line_end": 2941,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2908,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2917,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2920,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2921,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2924,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2930,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2936,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2938,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2940,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multiple_upload_field_accepts_heic",
          "type": "decorated_definition",
          "line_start": 2943,
          "line_end": 2956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2951,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2952,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2955,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILIMAGES_EXTENSIONS=[\"gif\", \"jpg\", \"jpeg\", \"png\", \"webp\", \"avif\", \"heic\"]\n    )"
          ]
        },
        {
          "name": "test_multiple_upload_field_without_avif",
          "type": "decorated_definition",
          "line_start": 2958,
          "line_end": 2967,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2964,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 2966,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_EXTENSIONS=[\"gif\", \"jpg\", \"jpeg\", \"png\", \"webp\"])"
          ]
        },
        {
          "name": "test_add_max_file_size_context_variables",
          "type": "decorated_definition",
          "line_start": 2969,
          "line_end": 2977,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2973,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2975,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_MAX_UPLOAD_SIZE=1000)"
          ]
        },
        {
          "name": "test_add_error_max_file_size_escaped",
          "type": "function_definition",
          "line_start": 2979,
          "line_end": 3001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2984,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2987,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2993,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_error_accepted_file_types_escaped",
          "type": "function_definition",
          "line_start": 3003,
          "line_end": 3025,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3008,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3011,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3017,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post",
          "type": "function_definition",
          "line_start": 3027,
          "line_end": 3079,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3045,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3049,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3050,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3051,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3052,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3055,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3055,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3060,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3062,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3063,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3066,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3067,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3069,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3072,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3072,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3072,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3072,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3077,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3027,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_no_title",
          "type": "function_definition",
          "line_start": 3081,
          "line_end": 3116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3100,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3101,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3105,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3105,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3114,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3114,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3114,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3114,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_nofile",
          "type": "function_definition",
          "line_start": 3118,
          "line_end": 3125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_add_post_badfile",
          "type": "function_definition",
          "line_start": 3127,
          "line_end": 3152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3143,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3143,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3143,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3143,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_bad_extension",
          "type": "decorated_definition",
          "line_start": 3154,
          "line_end": 3208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3181,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3181,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3181,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3181,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3199,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3199,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3199,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3154,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_bad_extension is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_EXTENSIONS=[\"jpg\", \"gif\"])"
          ]
        },
        {
          "name": "test_add_post_duplicate",
          "type": "function_definition",
          "line_start": 3210,
          "line_end": 3247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3236,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3240,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3243,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3243,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3243,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3243,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3210,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_duplicate is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_duplicate_choose_permission",
          "type": "function_definition",
          "line_start": 3249,
          "line_end": 3313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3258,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3260,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 3269,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3269,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3291,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3302,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3306,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3309,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3309,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3309,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3309,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3249,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post_duplicate_choose_permission is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_get",
          "type": "function_definition",
          "line_start": 3315,
          "line_end": 3325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_edit_post",
          "type": "function_definition",
          "line_start": 3327,
          "line_end": 3355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3345,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3345,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3345,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3345,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_validation_error",
          "type": "function_definition",
          "line_start": 3357,
          "line_end": 3389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3375,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3380,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3384,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3384,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3384,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3384,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_get",
          "type": "function_definition",
          "line_start": 3391,
          "line_end": 3401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_delete_post",
          "type": "function_definition",
          "line_start": 3403,
          "line_end": 3424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3420,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3420,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3420,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3420,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3434,
          "line_end": 3441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 3443,
          "line_end": 3455,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3443,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3452,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3455,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post",
          "type": "function_definition",
          "line_start": 3457,
          "line_end": 3503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3474,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3478,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3479,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3480,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3481,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3484,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3485,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3486,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3487,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3489,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3490,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3493,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3494,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3498,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3498,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3498,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3498,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3457,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_badfile",
          "type": "function_definition",
          "line_start": 3505,
          "line_end": 3530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3521,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3521,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3521,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3521,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_duplicate",
          "type": "function_definition",
          "line_start": 3532,
          "line_end": 3566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3553,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3557,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3558,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3559,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3562,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3562,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3562,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3562,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unique_together_validation_error",
          "type": "function_definition",
          "line_start": 3568,
          "line_end": 3603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3602,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2437,
          "ai_signals": []
        },
        {
          "name": "test_edit_post",
          "type": "function_definition",
          "line_start": 3605,
          "line_end": 3637,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3626,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3626,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3626,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3626,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_fails_unique_together_validation",
          "type": "function_definition",
          "line_start": 3639,
          "line_end": 3679,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3667,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3670,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3670,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3670,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3670,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3639,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_fails_unique_together_validation is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_post",
          "type": "function_definition",
          "line_start": 3681,
          "line_end": 3705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3698,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3698,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3698,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3698,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3715,
          "line_end": 3723,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 3720,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3720,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3720,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add",
          "type": "function_definition",
          "line_start": 3725,
          "line_end": 3734,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3725,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3734,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post",
          "type": "function_definition",
          "line_start": 3736,
          "line_end": 3790,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3764,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3768,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3769,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3772,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3773,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3774,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3776,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 3777,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3778,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3781,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3783,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3787,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3787,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3787,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3787,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3736,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function test_add_post is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_post_badfile",
          "type": "function_definition",
          "line_start": 3792,
          "line_end": 3817,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3808,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3808,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3808,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3808,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_from_upload_invalid_post",
          "type": "function_definition",
          "line_start": 3819,
          "line_end": 3872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3852,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3853,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3855,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 3856,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3857,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3860,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3862,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3865,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3869,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3869,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3869,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3869,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3819,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_from_upload_invalid_post is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_from_upload",
          "type": "function_definition",
          "line_start": 3874,
          "line_end": 3920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_model_no_labels",
              "severity": "low",
              "line": 3874,
              "description": "Vertex model deployed without labels \u2014 hard to track costs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3904,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3904,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3904,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3904,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3874,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_from_upload is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_uploaded_image",
          "type": "function_definition",
          "line_start": 3922,
          "line_end": 3944,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 3943,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 3943,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3943,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 3943,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3948,
          "line_end": 3956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 3958,
          "line_end": 4027,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3969,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3971,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3973,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3976,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3977,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3978,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3979,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3982,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4001,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4006,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4012,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4015,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4017,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4019,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4022,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3958,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_search_params",
          "type": "function_definition",
          "line_start": 4029,
          "line_end": 4062,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 4032,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4044,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4045,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4046,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4047,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4054,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4057,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4060,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4061,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_all_search_params",
          "type": "function_definition",
          "line_start": 4064,
          "line_end": 4096,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 4067,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4072,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4079,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4080,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4081,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4082,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4088,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4091,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4094,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4095,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_bad_permissions",
          "type": "function_definition",
          "line_start": 4098,
          "line_end": 4118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3131,
          "ai_signals": []
        },
        {
          "name": "test_get_with_bad_search_params",
          "type": "function_definition",
          "line_start": 4120,
          "line_end": 4139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4128,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 4135,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4135,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4147,
          "line_end": 4155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 4157,
          "line_end": 4200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4167,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4174,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4176,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4178,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4180,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4157,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_bad_permissions",
          "type": "function_definition",
          "line_start": 4202,
          "line_end": 4229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4210,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4221,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4227,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_bad_image",
          "type": "function_definition",
          "line_start": 4231,
          "line_end": 4245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4241,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3798,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_get_bad_filter_spec",
          "type": "function_definition",
          "line_start": 4247,
          "line_end": 4265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4263,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3307,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_get_with_default_filter_spec",
          "type": "function_definition",
          "line_start": 4267,
          "line_end": 4295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4274,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2671,
          "ai_signals": []
        },
        {
          "name": "test_get_with_width_filter_spec",
          "type": "function_definition",
          "line_start": 4297,
          "line_end": 4327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4300,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4306,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3723,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "test_get_with_height_filter_spec",
          "type": "function_definition",
          "line_start": 4329,
          "line_end": 4359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4332,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4338,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3723,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "test_get_with_fill_with_defaults_filter_spec",
          "type": "function_definition",
          "line_start": 4361,
          "line_end": 4395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4374,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2465,
          "ai_signals": []
        },
        {
          "name": "test_get_with_min_with_defaults_filter_spec",
          "type": "function_definition",
          "line_start": 4397,
          "line_end": 4431,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4410,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2465,
          "ai_signals": []
        },
        {
          "name": "test_get_with_max_with_defaults_filter_spec",
          "type": "function_definition",
          "line_start": 4433,
          "line_end": 4467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4446,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2465,
          "ai_signals": []
        },
        {
          "name": "test_get_with_fill_with_all_values_filter_spec",
          "type": "function_definition",
          "line_start": 4469,
          "line_end": 4498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 4472,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4477,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3798,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4502,
          "line_end": 4510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 4512,
          "line_end": 4523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 4523,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4381,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_preview_with_optimizer",
          "type": "function_definition",
          "line_start": 4525,
          "line_end": 4552,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 4534,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 4552,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3965,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_get_invalid_filter_spec",
          "type": "function_definition",
          "line_start": 4554,
          "line_end": 4569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4573,
          "line_end": 4600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 4585,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4585,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4588,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4592,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4599,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 4602,
          "line_end": 4611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4605,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 4613,
          "line_end": 4616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 4613,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 4613,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4616,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add",
          "type": "function_definition",
          "line_start": 4618,
          "line_end": 4621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4618,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 4623,
          "line_end": 4626,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4626,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 4628,
          "line_end": 4633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4633,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add_multiple",
          "type": "function_definition",
          "line_start": 4635,
          "line_end": 4638,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1465,
          "ai_signals": []
        },
        {
          "name": "test_as_superuser",
          "type": "function_definition",
          "line_start": 4642,
          "line_end": 4646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4646,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_as_ordinary_editor",
          "type": "function_definition",
          "line_start": 4648,
          "line_end": 4670,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 4652,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4652,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4655,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4658,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4664,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 4670,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 230,
        "avg_function_length": 18.72,
        "function_length_stddev": 13.84,
        "import_count": 32,
        "export_count": 0,
        "comment_lines": 544,
        "code_lines": 4127,
        "comment_ratio": 0.1165,
        "comment_what_ratio": 0.4715,
        "naming_avg_length": 7.48,
        "debug_artifacts": [],
        "ai_smell_count": 587,
        "ai_smell_density": 0.142234,
        "structural_uniformity": 0.2608,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.78,
        "mechanical": 71.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_image_operations.py",
      "language": "python",
      "line_count": 1102,
      "token_estimate": 8311,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "clone",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "resize",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_feature_store",
              "severity": "medium",
              "line": 43,
              "description": "Features computed ad-hoc for training and inference -- inconsistency between environments",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "crop",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "_check_size",
          "type": "decorated_definition",
          "line_start": 61,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "make_filter_spec_test",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4694,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "make_filter_spec_error_test",
          "type": "decorated_definition",
          "line_start": 94,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "make_run_test",
          "type": "decorated_definition",
          "line_start": 108,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 120,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3355,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "make_norun_test",
          "type": "decorated_definition",
          "line_start": 128,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 141,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3571,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setup_test_methods",
          "type": "decorated_definition",
          "line_start": 146,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 152,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "promptfoo_no_assertions",
              "severity": "critical",
              "line": 152,
              "description": "promptfoo test without assertions -- test provides no pass/fail signal and always succeeds",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "promptfoo_no_assertions",
              "severity": "critical",
              "line": 157,
              "description": "promptfoo test without assertions -- test provides no pass/fail signal and always succeeds",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 162,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "promptfoo_no_assertions",
              "severity": "critical",
              "line": 162,
              "description": "promptfoo test without assertions -- test provides no pass/fail signal and always succeeds",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 167,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "promptfoo_no_assertions",
              "severity": "critical",
              "line": 167,
              "description": "promptfoo test without assertions -- test provides no pass/fail signal and always succeeds",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_cache_key",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 551,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cache_key_fill_filter",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 558,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cache_key_fill_filter_with_focal_point",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 566,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 567,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 568,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 569,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 580,
          "line_end": 581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "run_mock",
          "type": "function_definition",
          "line_start": 583,
          "line_end": 584,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "run",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "register_image_operations_hook",
          "type": "function_definition",
          "line_start": 591,
          "line_end": 592,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_runs_operations",
          "type": "decorated_definition",
          "line_start": 596,
          "line_end": 608,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 606,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "patch.object(DummyOperation, \"run_mock\")",
            "hooks.register_temporarily(\n        \"register_image_operations\", register_image_operations_hook\n    )"
          ]
        },
        {
          "name": "test_run_raises_error",
          "type": "decorated_definition",
          "line_start": 612,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": [],
          "decorators": [
            "hooks.register_temporarily(\n        \"register_image_operations\", register_image_operations_hook\n    )"
          ]
        },
        {
          "name": "test_avif",
          "type": "function_definition",
          "line_start": 624,
          "line_end": 632,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 630,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_avif_lossless",
          "type": "function_definition",
          "line_start": 634,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 643,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_jpeg",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 653,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_png",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 665,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 663,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_gif",
          "type": "function_definition",
          "line_start": 667,
          "line_end": 675,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 673,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_webp",
          "type": "function_definition",
          "line_start": 677,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 683,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ico",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 693,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ico_rendition",
          "type": "function_definition",
          "line_start": 697,
          "line_end": 705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_webp_lossless",
          "type": "function_definition",
          "line_start": 707,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 716,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_heic",
          "type": "function_definition",
          "line_start": 721,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 727,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_heic_lossless",
          "type": "function_definition",
          "line_start": 731,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 740,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_invalid",
          "type": "function_definition",
          "line_start": 744,
          "line_end": 750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_default_quality",
          "type": "function_definition",
          "line_start": 754,
          "line_end": 765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 763,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_avif_quality_filter",
          "type": "function_definition",
          "line_start": 767,
          "line_end": 778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 776,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_avif_quality_filter_invalid",
          "type": "function_definition",
          "line_start": 780,
          "line_end": 786,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_avif_quality_filter_no_value",
          "type": "function_definition",
          "line_start": 788,
          "line_end": 794,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_avif_quality_filter_too_big",
          "type": "function_definition",
          "line_start": 796,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_avif_quality_setting",
          "type": "decorated_definition",
          "line_start": 804,
          "line_end": 816,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 814,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_AVIF_QUALITY=50)"
          ]
        },
        {
          "name": "test_avif_quality_filter_overrides_setting",
          "type": "decorated_definition",
          "line_start": 818,
          "line_end": 830,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 828,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_AVIF_QUALITY=50)"
          ]
        },
        {
          "name": "test_default_quality",
          "type": "function_definition",
          "line_start": 834,
          "line_end": 845,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 843,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_jpeg_quality_filter",
          "type": "function_definition",
          "line_start": 847,
          "line_end": 858,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 856,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_jpeg_quality_filter_invalid",
          "type": "function_definition",
          "line_start": 860,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_quality_filter_no_value",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 874,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_quality_filter_too_big",
          "type": "function_definition",
          "line_start": 876,
          "line_end": 882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_jpeg_quality_setting",
          "type": "decorated_definition",
          "line_start": 884,
          "line_end": 896,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 894,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_JPEG_QUALITY=50)"
          ]
        },
        {
          "name": "test_jpeg_quality_filter_overrides_setting",
          "type": "decorated_definition",
          "line_start": 898,
          "line_end": 910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 908,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_JPEG_QUALITY=50)"
          ]
        },
        {
          "name": "test_default_quality",
          "type": "function_definition",
          "line_start": 914,
          "line_end": 925,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 923,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_webp_quality_filter",
          "type": "function_definition",
          "line_start": 927,
          "line_end": 938,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 936,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_webp_quality_filter_invalid",
          "type": "function_definition",
          "line_start": 940,
          "line_end": 946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_webp_quality_filter_no_value",
          "type": "function_definition",
          "line_start": 948,
          "line_end": 954,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_webp_quality_filter_too_big",
          "type": "function_definition",
          "line_start": 956,
          "line_end": 962,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_webp_quality_setting",
          "type": "decorated_definition",
          "line_start": 964,
          "line_end": 976,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 974,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_WEBP_QUALITY=50)"
          ]
        },
        {
          "name": "test_webp_quality_filter_overrides_setting",
          "type": "decorated_definition",
          "line_start": 978,
          "line_end": 990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 988,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4205,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_WEBP_QUALITY=50)"
          ]
        },
        {
          "name": "test_original_has_alpha",
          "type": "function_definition",
          "line_start": 994,
          "line_end": 1003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1001,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_3_digit_hex",
          "type": "function_definition",
          "line_start": 1005,
          "line_end": 1013,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1011,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_6_digit_hex",
          "type": "function_definition",
          "line_start": 1015,
          "line_end": 1023,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1021,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5012,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid",
          "type": "function_definition",
          "line_start": 1025,
          "line_end": 1031,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_invalid_length",
          "type": "function_definition",
          "line_start": 1033,
          "line_end": 1039,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1512,
          "ai_signals": []
        },
        {
          "name": "test_webp_convert_to_png",
          "type": "function_definition",
          "line_start": 1043,
          "line_end": 1053,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1051,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4694,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_override_webp_convert_to_png",
          "type": "decorated_definition",
          "line_start": 1055,
          "line_end": 1066,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_callback",
              "severity": "low",
              "line": 1064,
              "description": "Chain execution without callbacks -- no observability into token usage or latency",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4429,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "override_settings(WAGTAILIMAGES_FORMAT_CONVERSIONS={\"webp\": \"webp\"})"
          ]
        },
        {
          "name": "test_check_size_when_floats_allowed",
          "type": "function_definition",
          "line_start": 1070,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1077,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4012,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_check_size_when_floats_forbidden",
          "type": "function_definition",
          "line_start": 1085,
          "line_end": 1101,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1091,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3571,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 61,
        "avg_function_length": 9.89,
        "function_length_stddev": 4.06,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 66,
        "code_lines": 1036,
        "comment_ratio": 0.0599,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.25,
        "debug_artifacts": [],
        "ai_smell_count": 48,
        "ai_smell_density": 0.046332,
        "structural_uniformity": 0.5895,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.65,
        "mechanical": 87.65,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_site_summary.py",
      "language": "python",
      "line_count": 137,
      "token_estimate": 1222,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 85,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 18,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 21,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 24,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 62,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 68,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 77,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 78,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 86,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 87,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 95,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 96,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 85 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 85 lines (> 37 dynamic threshold)",
                "impact": "Function setUpTestData is 85 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_request",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "assertSummaryContains",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_site_name_is_shown",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_user_with_permissions_is_shown_panel",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_user_with_no_permissions_is_not_shown_panel",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_sees_proper_image_count",
          "type": "function_definition",
          "line_start": 127,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 133,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 14.62,
        "function_length_stddev": 28.62,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 127,
        "comment_ratio": 0.073,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.65,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.125984,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.55,
        "mechanical": 72.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\multiple.py",
      "language": "python",
      "line_count": 183,
      "token_estimate": 1566,
      "functions": [
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 51,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 53,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 56,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 56,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 57,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 57,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_upload_form_class",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_confirm_duplicate_upload_response",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_edit_object_response_data",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 132,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 132,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 132,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 133,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 133,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 144,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 144,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 145,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 145,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 156,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 156,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 157,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 157,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0525,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 181,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 181,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 182,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 182,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 6.2,
        "function_length_stddev": 6.27,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 179,
        "comment_ratio": 0.0219,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 10.15,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.122905,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.63,
        "mechanical": 74.63,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\tests.py",
      "language": "python",
      "line_count": 394,
      "token_estimate": 3441,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 30,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 32,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 33,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_index_view_doesnt_show_add_locale_button_if_all_locales_created",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\")])"
          ]
        },
        {
          "name": "test_index_view_shows_add_locale_button_with_stale_locales",
          "type": "decorated_definition",
          "line_start": 41,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")])"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_default_language",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 66,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 69,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 70,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 72,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 76,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_duplicate_not_allowed",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3994,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_language_code_must_be_in_settings",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 117,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3994,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_create_view_no_access_if_all_locales_created",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 127,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\")])"
          ]
        },
        {
          "name": "test_create_view_can_access_with_stale_locales",
          "type": "decorated_definition",
          "line_start": 131,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 136,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")])"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 161,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 164,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 165,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 171,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_invalid_language",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 191,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 194,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_edit_duplicate_not_allowed",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 231,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3552,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_edit_language_code_must_be_in_settings",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 246,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3994,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 257,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 269,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 272,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 273,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_delete_locale",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 284,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_cannot_delete_locales_with_pages",
          "type": "function_definition",
          "line_start": 286,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_can_delete_default_locale",
          "type": "decorated_definition",
          "line_start": 306,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 320,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.266,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(\n        LANGUAGE_CODE=\"de-at\",\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"fr\", \"French\"),\n            (\"de\", \"German\"),\n            (\"pl\", \"Polish\"),\n            (\"ja\", \"Japanese\"),\n        ],\n    )"
          ]
        },
        {
          "name": "test_can_delete_default_locale_when_language_code_has_no_locale",
          "type": "decorated_definition",
          "line_start": 337,
          "line_end": 362,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(\n        LANGUAGE_CODE=\"de-at\",\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"fr\", \"French\"),\n            (\"de\", \"German\"),\n            (\"pl\", \"Polish\"),\n            (\"ja\", \"Japanese\"),\n        ],\n    )"
          ]
        },
        {
          "name": "test_cannot_delete_last_remaining_locale",
          "type": "function_definition",
          "line_start": 364,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1494,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_registered_permissions",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 385,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 385,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 387,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4994,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 34,
        "avg_function_length": 9.91,
        "function_length_stddev": 7.65,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 367,
        "comment_ratio": 0.0685,
        "comment_what_ratio": 0.5185,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 27,
        "ai_smell_density": 0.073569,
        "structural_uniformity": 0.2283,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.45,
        "mechanical": 81.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\convert_mariadb_uuids.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 392,
      "functions": [
        {
          "name": "convert_field",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1267,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 37,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13.5,
        "function_length_stddev": 4.95,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 42,
        "comment_ratio": 0.0455,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.99,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.02381,
        "structural_uniformity": 0.6334,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.5,
        "mechanical": 83.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\rebuild_references_index.py",
      "language": "python",
      "line_count": 107,
      "token_estimate": 859,
      "functions": [
        {
          "name": "write",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.049,
          "ai_signals": []
        },
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.049,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 34,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 45,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 55,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 31,
              "description": "Function is 33 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 33 lines (> 22 dynamic threshold)",
                "impact": "Function handle is 33 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.399,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "print_newline",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.049,
          "ai_signals": []
        },
        {
          "name": "print_iter_progress",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 73,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 79,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3672,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "queryset_chunks",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_chunk_overlap",
              "severity": "medium",
              "line": 93,
              "description": "Chunking without overlap -- loses context at chunk boundaries",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2824,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 14.83,
        "function_length_stddev": 11.2,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 84,
        "comment_ratio": 0.215,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.2452,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.3,
        "mechanical": 71.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0005_add_page_lock_permission_to_moderators.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 202,
      "functions": [
        {
          "name": "add_page_lock_permission_to_moderators",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 5,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 5,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 6,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 6,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 14,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 17,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.4,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.21875,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 64.4,
        "mechanical": 64.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0013_update_golive_expire_help_text.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 238,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 34,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0021_capitalizeverbose.py",
      "language": "python",
      "line_count": 273,
      "token_estimate": 2338,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 273,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.4,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0028_merge.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 77,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 12,
        "comment_ratio": 0.0769,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.36,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0036_populate_page_last_published_at.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 138,
      "functions": [
        {
          "name": "forwards_func",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 21,
        "comment_ratio": 0.0455,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.26,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.095238,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.19,
        "mechanical": 76.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0044_add_unlock_grouppagepermission.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 217,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 29,
        "comment_ratio": 0.0333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0052_pagelogentry.py",
      "language": "python",
      "line_count": 85,
      "token_estimate": 762,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 84,
        "comment_ratio": 0.0118,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0060_fix_workflow_unique_constraint.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 173,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.48,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0068_log_entry_empty_object.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 260,
      "functions": [
        {
          "name": "replace_empty_string_with_empty_object",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5617,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "revert_empty_object_to_empty_string",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 14,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 14,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 15,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 15,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5617,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 30,
        "comment_ratio": 0.0323,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.7,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.266667,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0076_modellogentry_revision.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 173,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0084_add_default_page_permissions.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 184,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.97,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0092_alter_collectionviewrestriction_password_and_more.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 438,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 33,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\audit_log.py",
      "language": "python",
      "line_count": 381,
      "token_estimate": 3352,
      "functions": [
        {
          "name": "get_actions",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "get_user_ids",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "get_users",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 43,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 43,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_content_type_ids",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "filter_on_content_type",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 58,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "with_instances",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 69,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 73,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 87,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 90,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 60,
              "description": "Function is 33 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 33 lines (> 30 dynamic threshold)",
                "impact": "Function with_instances is 33 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "latest_uuid_for_user_revision_action",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "latest_by_uuid_and_action",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "get_instance_title",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "log_action",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 156,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2482,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "viewable_by_user",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 195,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 172,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 183,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 190,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 191,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_for_model",
          "type": "function_definition",
          "line_start": 197,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 197,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 197,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 202,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 202,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_for_user",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "user_display_name",
          "type": "decorated_definition",
          "line_start": 295,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 309,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2173,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "object_verbose_name",
          "type": "decorated_definition",
          "line_start": 316,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "object_id",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "formatter",
          "type": "decorated_definition",
          "line_start": 327,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "message",
          "type": "decorated_definition",
          "line_start": 331,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "comment",
          "type": "decorated_definition",
          "line_start": 338,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "log_action",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 351,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 353,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 27,
        "avg_function_length": 9.37,
        "function_length_stddev": 9.26,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 61,
        "code_lines": 320,
        "comment_ratio": 0.1601,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.34,
        "debug_artifacts": [],
        "ai_smell_count": 20,
        "ai_smell_density": 0.0625,
        "structural_uniformity": 0.0116,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.19,
        "mechanical": 82.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\orderable.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 157,
      "functions": [
        {
          "name": "set_max_order",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 8.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\view_restrictions.py",
      "language": "python",
      "line_count": 82,
      "token_estimate": 767,
      "functions": [
        {
          "name": "accept_request",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4601,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ]
        },
        {
          "name": "mark_as_passed",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2851,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 19,
        "function_length_stddev": 1.41,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 70,
        "comment_ratio": 0.1463,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 7.81,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.014286,
        "structural_uniformity": 0.9256,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.98,
        "mechanical": 78.98,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\search\\views.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 355,
      "functions": [
        {
          "name": "search",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 14,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 14,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 20,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 20,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 33,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 37,
        "comment_ratio": 0.2128,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 7.42,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.108108,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 62.6,
        "mechanical": 62.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 12,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\postgres\\postgres.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 19,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\elasticsearch7.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 272,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 20.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\management\\commands\\update_index.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 21,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0007_delete_editorspick.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 177,
      "functions": [
        {
          "name": "database_forwards",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 7,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 8,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 11,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.57,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.208333,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.5,
        "mechanical": 69.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\tasks.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 11,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\sites\\tests.py",
      "language": "python",
      "line_count": 500,
      "token_estimate": 4301,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 24,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 27,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "create_site",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_default_fixtures_present",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 81,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 82,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 84,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_duplicate_defaults_not_allowed",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 114,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_duplicate_hostnames_on_different_ports_allowed",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_duplicate_hostnames_on_same_port_not_allowed",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 149,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3593,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_duplicate_hostnames_case_variant_not_allowed",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 165,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_non_field_errors_are_displayed",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 191,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3399,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 213,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3399,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 231,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 232,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 234,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_nonexistent_redirect",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_changing_the_default_site_workflow",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_making_a_second_site_the_default_not_allowed",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 311,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3316,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_duplicate_hostnames_case_variant_not_allowed",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 334,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3399,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_non_field_errors_are_displayed",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 364,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2945,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 378,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 387,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 388,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_nonexistent_redirect",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_posting_deletes_site",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 424,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_get_create_view",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 428,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 430,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_get_edit_view",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_get_delete_view",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 475,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1649,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.56)"
          ]
        },
        {
          "name": "test_registered_permissions",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 491,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 491,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 493,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5149,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.56)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 41,
        "avg_function_length": 10.63,
        "function_length_stddev": 7.77,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 314,
        "code_lines": 186,
        "comment_ratio": 0.628,
        "comment_what_ratio": 0.5556,
        "naming_avg_length": 7.1,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.129032,
        "structural_uniformity": 0.2689,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.13,
        "mechanical": 74.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\bulk_actions\\delete.py",
      "language": "python",
      "line_count": 91,
      "token_estimate": 967,
      "functions": [
        {
          "name": "_actionable_objects",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_actionable_objects",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": []
        },
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 60,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0951,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 76,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3284,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 6.75,
        "function_length_stddev": 3.99,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 76,
        "comment_ratio": 0.1648,
        "comment_what_ratio": 0.0667,
        "naming_avg_length": 7.79,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.013158,
        "structural_uniformity": 0.4087,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.34,
        "mechanical": 95.34,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_bulk_actions\\test_bulk_delete.py",
      "language": "python",
      "line_count": 326,
      "token_estimate": 3027,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2961,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1439,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 50,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 52,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 53,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4939,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_single_delete",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 61,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 63,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 64,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4939,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_bulk_delete",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 90,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4939,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_with_limited_permissions",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 97,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 111,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4939,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_bulk_action_hook_get",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 131,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3282,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_before_bulk_action_hook_post",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 154,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.303,
          "ai_signals": []
        },
        {
          "name": "test_after_bulk_action_hook",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 177,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3189,
          "ai_signals": []
        },
        {
          "name": "test_before_delete_snippet_hook_get",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 200,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3189,
          "ai_signals": []
        },
        {
          "name": "test_before_delete_snippet_hook_post",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 221,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3189,
          "ai_signals": []
        },
        {
          "name": "test_after_delete_snippet_hook",
          "type": "function_definition",
          "line_start": 232,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 242,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3384,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 253,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 262,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3282,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1439,
          "ai_signals": []
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 285,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2606,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 307,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 320,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3282,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 17.94,
        "function_length_stddev": 8.19,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 17,
        "code_lines": 309,
        "comment_ratio": 0.0521,
        "comment_what_ratio": 0.1765,
        "naming_avg_length": 7.77,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.067961,
        "structural_uniformity": 0.5432,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.28,
        "mechanical": 78.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_create_view.py",
      "language": "python",
      "line_count": 1196,
      "token_estimate": 11364,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 56,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4174,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 67,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 68,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 70,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_snippet_with_tabbed_interface",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 97,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 105,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_with_limited_permissions",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 114,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3685,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_create_invalid",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 127,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 124,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_invalid is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2451,
          "ai_signals": []
        },
        {
          "name": "test_create_invalid_with_json_response",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 180,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3493,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_create_with_json_response",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 211,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2393,
          "ai_signals": []
        },
        {
          "name": "test_create_with_inline_models_and_json_response",
          "type": "function_definition",
          "line_start": 224,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 246,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2199,
          "ai_signals": []
        },
        {
          "name": "test_create_with_tags",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_create_file_upload_multipart",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 285,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_create_with_revision",
          "type": "function_definition",
          "line_start": 287,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_before_create_snippet_hook_get",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 322,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4174,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_before_create_snippet_hook_get_with_json_response",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 338,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 348,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3793,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_before_create_snippet_hook_post",
          "type": "function_definition",
          "line_start": 350,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 361,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3326,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_before_create_snippet_hook_post_with_json_response",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 386,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 405,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 366,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_before_create_snippet_hook_post_with_json_response is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3434,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "test_after_create_snippet_hook",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 422,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.318,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_after_create_snippet_hook_post_with_json_response",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 449,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 463,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 427,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_after_create_snippet_hook_post_with_json_response is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3618,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        },
        {
          "name": "test_register_snippet_action_menu_item",
          "type": "function_definition",
          "line_start": 468,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 470,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2393,
          "ai_signals": []
        },
        {
          "name": "test_register_snippet_action_menu_item_as_none",
          "type": "function_definition",
          "line_start": 494,
          "line_end": 504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_construct_snippet_action_menu",
          "type": "function_definition",
          "line_start": 506,
          "line_end": 553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 508,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 517,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 532,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 547,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 506,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_construct_snippet_action_menu is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_shows_status_side_panel_skeleton",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 560,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 564,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 565,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 567,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 568,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 569,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 572,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 597,
          "line_end": 611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_with_existing_locale",
          "type": "function_definition",
          "line_start": 613,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 630,
          "line_end": 645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_on_non_translatable_snippet",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 669,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 674,
          "line_end": 678,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 680,
          "line_end": 745,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 685,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 687,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 707,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 680,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3114,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ]
        },
        {
          "name": "test_save_draft",
          "type": "function_definition",
          "line_start": 747,
          "line_end": 777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 777,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2122,
          "ai_signals": []
        },
        {
          "name": "test_create_skips_validation_when_saving_draft",
          "type": "function_definition",
          "line_start": 779,
          "line_end": 797,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 792,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 797,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_required_asterisk_on_reshowing_form",
          "type": "function_definition",
          "line_start": 799,
          "line_end": 816,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 811,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 815,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 816,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_will_not_publish_invalid_snippet",
          "type": "function_definition",
          "line_start": 818,
          "line_end": 828,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_publish",
          "type": "function_definition",
          "line_start": 830,
          "line_end": 877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 830,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1722,
          "ai_signals": []
        },
        {
          "name": "test_publish_bad_permissions",
          "type": "function_definition",
          "line_start": 879,
          "line_end": 943,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 883,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 887,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 891,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 879,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_bad_permissions is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3146,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_publish_with_publish_permission",
          "type": "function_definition",
          "line_start": 945,
          "line_end": 1013,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 949,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 953,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 957,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 945,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_with_publish_permission is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3022,
          "ai_signals": [
            "High anti-pattern density (0.58)"
          ]
        },
        {
          "name": "test_create_scheduled",
          "type": "function_definition",
          "line_start": 1015,
          "line_end": 1045,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_create_scheduled_go_live_before_expiry",
          "type": "function_definition",
          "line_start": 1047,
          "line_end": 1082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1060,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1065,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1072,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1080,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1081,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_scheduled_expire_in_the_past",
          "type": "function_definition",
          "line_start": 1084,
          "line_end": 1113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1096,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1103,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1112,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_post_publish_scheduled",
          "type": "function_definition",
          "line_start": 1115,
          "line_end": 1147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0993,
          "ai_signals": []
        },
        {
          "name": "test_create_shows_status_side_panel_skeleton",
          "type": "function_definition",
          "line_start": 1149,
          "line_end": 1180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1154,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1158,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1161,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1162,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1163,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1166,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_inline_panel_media",
          "type": "function_definition",
          "line_start": 1188,
          "line_end": 1195,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1195,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 47,
        "avg_function_length": 23.3,
        "function_length_stddev": 17.06,
        "import_count": 21,
        "export_count": 0,
        "comment_lines": 80,
        "code_lines": 1116,
        "comment_ratio": 0.0669,
        "comment_what_ratio": 0.2286,
        "naming_avg_length": 7.71,
        "debug_artifacts": [],
        "ai_smell_count": 73,
        "ai_smell_density": 0.065412,
        "structural_uniformity": 0.2677,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.76,
        "mechanical": 78.76,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_permissions.py",
      "language": "python",
      "line_count": 168,
      "token_estimate": 1606,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 26,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 32,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 37,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 40,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 41,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2219,
          "ai_signals": []
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2219,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 75,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 78,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 80,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 86,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 91,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 104,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2219,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 130,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 132,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 138,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_add",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 143,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_edit",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2219,
          "ai_signals": []
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 166,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 167,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5719,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 8.87,
        "function_length_stddev": 3.46,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 156,
        "comment_ratio": 0.0714,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.134615,
        "structural_uniformity": 0.6096,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_viewset.py",
      "language": "python",
      "line_count": 1775,
      "token_estimate": 17088,
      "functions": [
        {
          "name": "test_no_model_set_or_passed",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_unknown_converter",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_get_views",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 125,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 129,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_get_history",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 141,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 144,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_workflow_history_detail",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 148,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 148,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 163,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 164,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 174,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3882,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_adapt_with_explicit_icon",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 186,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_explicit_default_icon",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 194,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_adapt_with_no_icon_specified_on_block_or_viewset",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 202,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deconstruct",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_render_html",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_render_as_empty_field",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_chooser_popup",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 275,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 277,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 280,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 280,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 280,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 282,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 285,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 286,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chosen",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 297,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.32,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_create_from_chooser",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 312,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3882,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_default_url_namespace",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_default_admin_base_path",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 365,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_custom_url_namespace",
          "type": "function_definition",
          "line_start": 367,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_custom_admin_base_path",
          "type": "function_definition",
          "line_start": 385,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_cannot_reverse_mismatched_converter_value",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_404_on_mismatched_converter_value",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 421,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 419,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 420,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 425,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_default_list_pagination",
          "type": "function_definition",
          "line_start": 436,
          "line_end": 444,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_custom_list_pagination",
          "type": "function_definition",
          "line_start": 446,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_default_chooser_pagination",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_custom_chooser_pagination",
          "type": "function_definition",
          "line_start": 468,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 484,
          "line_end": 485,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "create_test_snippets",
          "type": "function_definition",
          "line_start": 487,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_get_include_filters_form_media",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 497,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 498,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unfiltered_no_results",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 508,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unfiltered_with_results",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 520,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3882,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_empty_filter_with_results",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 532,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3882,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_filtered_no_results",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 542,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 546,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtered_with_results",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 562,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 566,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_range_filter",
          "type": "function_definition",
          "line_start": 575,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 582,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2291,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 603,
          "line_end": 604,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 606,
          "line_end": 609,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 611,
          "line_end": 612,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "create_test_snippets",
          "type": "function_definition",
          "line_start": 614,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_filtered_searched_no_results",
          "type": "function_definition",
          "line_start": 622,
          "line_end": 630,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 628,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_filtered_searched_with_results",
          "type": "function_definition",
          "line_start": 632,
          "line_end": 641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 639,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 650,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 652,
          "line_end": 653,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "create_test_snippets",
          "type": "function_definition",
          "line_start": 655,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_get_include_filters_form_media",
          "type": "function_definition",
          "line_start": 662,
          "line_end": 668,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 664,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 665,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unfiltered_no_results",
          "type": "function_definition",
          "line_start": 670,
          "line_end": 688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 681,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2542,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_unfiltered_with_results",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 698,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2888,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_empty_filter_with_results",
          "type": "function_definition",
          "line_start": 707,
          "line_end": 722,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 715,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2888,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_filtered_no_results",
          "type": "function_definition",
          "line_start": 724,
          "line_end": 740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 733,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2759,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_filtered_with_results",
          "type": "function_definition",
          "line_start": 742,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 749,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3034,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_filtered_contains_with_results",
          "type": "function_definition",
          "line_start": 762,
          "line_end": 776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 769,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3034,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 782,
          "line_end": 785,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 787,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_custom_columns",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 807,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2222,
          "ai_signals": []
        },
        {
          "name": "test_falsy_value",
          "type": "function_definition",
          "line_start": 814,
          "line_end": 817,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 817,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_boolean_column",
          "type": "function_definition",
          "line_start": 819,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 819,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_boolean_column is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1534,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 866,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_empty_foreignkey",
          "type": "function_definition",
          "line_start": 872,
          "line_end": 877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 877,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_single_level_relation",
          "type": "function_definition",
          "line_start": 879,
          "line_end": 889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 883,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 889,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_multi_level_relation",
          "type": "function_definition",
          "line_start": 891,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 898,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 904,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_get_not_export_shows_export_buttons",
          "type": "function_definition",
          "line_start": 923,
          "line_end": 928,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_csv_export",
          "type": "function_definition",
          "line_start": 930,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_xlsx_export",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 993,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 953,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_xlsx_export is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1554,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 999,
          "line_end": 1001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_template_lookups",
          "type": "function_definition",
          "line_start": 1003,
          "line_end": 1064,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1006,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1013,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1020,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1034,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1039,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1042,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1048,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1059,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1062,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1063,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1064,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1003,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_template_lookups is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1070,
          "line_end": 1078,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1074,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1074,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1075,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1075,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1076,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1076,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_index_view",
          "type": "function_definition",
          "line_start": 1080,
          "line_end": 1084,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1090,
          "line_end": 1099,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1094,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1094,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1095,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1095,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1096,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1096,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1097,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1097,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_index_view_order",
          "type": "function_definition",
          "line_start": 1101,
          "line_end": 1114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1107,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1107,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1120,
          "line_end": 1130,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1132,
          "line_end": 1133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1135,
          "line_end": 1147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1138,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1142,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_empty_q",
          "type": "function_definition",
          "line_start": 1149,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1156,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_is_searchable",
          "type": "function_definition",
          "line_start": 1163,
          "line_end": 1164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_search_index_view",
          "type": "function_definition",
          "line_start": 1166,
          "line_end": 1174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1172,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_index_results_view",
          "type": "function_definition",
          "line_start": 1176,
          "line_end": 1184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1182,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1188,
          "line_end": 1191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_add_to_admin_menu",
          "type": "function_definition",
          "line_start": 1193,
          "line_end": 1200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1198,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_to_settings_menu",
          "type": "function_definition",
          "line_start": 1202,
          "line_end": 1209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1207,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_group_registration",
          "type": "function_definition",
          "line_start": 1211,
          "line_end": 1233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1217,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1224,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1231,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_limited_permissions",
          "type": "function_definition",
          "line_start": 1235,
          "line_end": 1252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1239,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2645,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_basic_permissions",
          "type": "function_definition",
          "line_start": 1254,
          "line_end": 1279,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1259,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1264,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1267,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1270,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1275,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_snippets_menu_item_hidden_when_all_snippets_have_menu_item",
          "type": "function_definition",
          "line_start": 1281,
          "line_end": 1300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1287,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.245,
          "ai_signals": []
        },
        {
          "name": "test_snippets_menu_item_hidden_when_user_lacks_permissions_for_snippets",
          "type": "function_definition",
          "line_start": 1302,
          "line_end": 1313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1306,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3617,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_get_form_class",
          "type": "function_definition",
          "line_start": 1319,
          "line_end": 1330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1336,
          "line_end": 1339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_enabled",
          "type": "function_definition",
          "line_start": 1341,
          "line_end": 1372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_disabled",
          "type": "function_definition",
          "line_start": 1374,
          "line_end": 1378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_only_add_permission",
          "type": "function_definition",
          "line_start": 1380,
          "line_end": 1420,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1386,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1389,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1380,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_only_add_permission is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3261,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        },
        {
          "name": "test_custom_fields",
          "type": "function_definition",
          "line_start": 1422,
          "line_end": 1489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1422,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_fields is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1215,
          "ai_signals": []
        },
        {
          "name": "test_exclude_fields",
          "type": "function_definition",
          "line_start": 1491,
          "line_end": 1524,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_image_and_document_fields",
          "type": "function_definition",
          "line_start": 1526,
          "line_end": 1550,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1528,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1528,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1532,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1532,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1546,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_and_document_fields_none_values",
          "type": "function_definition",
          "line_start": 1552,
          "line_end": 1567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1573,
          "line_end": 1575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_index_view",
          "type": "function_definition",
          "line_start": 1577,
          "line_end": 1580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1579,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1580,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_view",
          "type": "function_definition",
          "line_start": 1582,
          "line_end": 1591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1587,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1589,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1591,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_view",
          "type": "function_definition",
          "line_start": 1593,
          "line_end": 1602,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1598,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1600,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1602,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete_view",
          "type": "function_definition",
          "line_start": 1604,
          "line_end": 1606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1606,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_history_view",
          "type": "function_definition",
          "line_start": 1608,
          "line_end": 1621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1613,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1617,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1619,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1621,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_view",
          "type": "function_definition",
          "line_start": 1623,
          "line_end": 1636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1628,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1632,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1634,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1636,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_inspect_view",
          "type": "function_definition",
          "line_start": 1638,
          "line_end": 1651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1643,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1647,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1649,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1651,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_workflow_history_view",
          "type": "function_definition",
          "line_start": 1653,
          "line_end": 1668,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1660,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1664,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1666,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1668,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_view_get_add_url_is_respected",
          "type": "function_definition",
          "line_start": 1674,
          "line_end": 1679,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1677,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_index_view_get_add_url_is_respected_with_i18n",
          "type": "decorated_definition",
          "line_start": 1681,
          "line_end": 1688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1686,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_index_results_view_get_add_url_teleports_to_header",
          "type": "function_definition",
          "line_start": 1690,
          "line_end": 1704,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1693,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3034,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_index_results_view_get_add_url_teleports_to_header_with_i18n",
          "type": "decorated_definition",
          "line_start": 1706,
          "line_end": 1722,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1711,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2759,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1728,
          "line_end": 1730,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_get_edit_view_not_allowed",
          "type": "function_definition",
          "line_start": 1732,
          "line_end": 1744,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_snippet_without_menu_item_breadcrumbs",
          "type": "function_definition",
          "line_start": 1748,
          "line_end": 1755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1752,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1753,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_snippet_with_menu_item_breadcrumbs",
          "type": "function_definition",
          "line_start": 1757,
          "line_end": 1758,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.07,
          "ai_signals": []
        },
        {
          "name": "test_snippet_with_menu_item_breadcrumbs",
          "type": "function_definition",
          "line_start": 1760,
          "line_end": 1765,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1763,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_snippet_with_menu_item_breadcrumbs_show_all",
          "type": "decorated_definition",
          "line_start": 1767,
          "line_end": 1774,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1771,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1772,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.42,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILSNIPPETS_MENU_SHOW_ALL=True)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 117,
        "avg_function_length": 12.94,
        "function_length_stddev": 10.87,
        "import_count": 35,
        "export_count": 0,
        "comment_lines": 91,
        "code_lines": 1684,
        "comment_ratio": 0.0513,
        "comment_what_ratio": 0.1905,
        "naming_avg_length": 7.66,
        "debug_artifacts": [],
        "ai_smell_count": 142,
        "ai_smell_density": 0.084323,
        "structural_uniformity": 0.1596,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.45,
        "mechanical": 77.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\telepath.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 107,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Adapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'AdapterRegistry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'JSContext' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'JSContextBase' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailAdapterRegistry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'WagtailJSContextBase' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'adapter' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'register' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 3,
              "description": "Unused import: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'registry' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.telepath import (  # noqa: F401\n    Adapter,\n    AdapterRegistry,\n    JSContext,\n    JSContextBase,\n    WagtailAdapterRegistry,\n    WagtailJSContextBase,\n    adapter,\n    register,\n    registry,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 21,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.26,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 9
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\tests.py",
      "language": "python",
      "line_count": 48,
      "token_estimate": 415,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_db_value_is_different",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_custom_user_primary_key_is_hashable",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_custom_user_primary_key_is_jsonable",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_custom_user_primary_key",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_custom_user_primary_key_is_converted_value_field",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0634,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value_returns_integer_for_db_query",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 46,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 46,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4134,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 3.57,
        "function_length_stddev": 2.44,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 47,
        "comment_ratio": 0.0208,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.5,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.042553,
        "structural_uniformity": 0.3169,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.36,
        "mechanical": 89.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\demosite\\models.py",
      "language": "python",
      "line_count": 695,
      "token_estimate": 4475,
      "functions": [
        {
          "name": "link",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        },
        {
          "name": "get_blog_index",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        },
        {
          "name": "get_blog_entries",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        },
        {
          "name": "get_event_index",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 474,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        },
        {
          "name": "get_events",
          "type": "function_definition",
          "line_start": 552,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1278,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 8.43,
        "function_length_stddev": 4.65,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 674,
        "comment_ratio": 0.0302,
        "comment_what_ratio": 0.1905,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4483,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.43,
        "mechanical": 98.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\emailuser\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 66,
      "token_estimate": 584,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 65,
        "comment_ratio": 0.0152,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.38,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\i18n\\migrations\\0003_alter_clusterabletestmodel_locale_and_more.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 446,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 40,
        "comment_ratio": 0.0244,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.45,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\routablepage\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 66,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\apps.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 229,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 15,
        "comment_ratio": 0.25,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0007_translatablesnippet.py",
      "language": "python",
      "line_count": 49,
      "token_estimate": 362,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 48,
        "comment_ratio": 0.0204,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.21,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\streamfield_migrations\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 71,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.45,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\blocks.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 242,
      "functions": [
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1434,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.72)"
          ]
        },
        {
          "name": "get_form_context",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 15,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 16,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4934,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.72)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 5,
        "function_length_stddev": 1.41,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 33,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.060606,
        "structural_uniformity": 0.7172,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.85,
        "mechanical": 84.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0005_previewablemodel_nonpreviewablemodel_and_more.py",
      "language": "python",
      "line_count": 105,
      "token_estimate": 831,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 104,
        "comment_ratio": 0.0095,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0013_draftstatemodel_add_lockablemixin.py",
      "language": "python",
      "line_count": 44,
      "token_estimate": 330,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 43,
        "comment_ratio": 0.0227,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0021_remove_non_json_field_streamfields.py",
      "language": "python",
      "line_count": 140,
      "token_estimate": 1232,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 139,
        "comment_ratio": 0.0071,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0029_variousondeletemodel_cascading_toy.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 161,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0037_testpermissionedgenericsetting_and_more.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 423,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 42,
        "comment_ratio": 0.0233,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.99,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0045_alter_streampage_body.py",
      "language": "python",
      "line_count": 53,
      "token_estimate": 424,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 52,
        "comment_ratio": 0.0189,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0053_pagewithexcludedcopyfield_special_stream_and_more.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 437,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 57,
        "comment_ratio": 0.0172,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.23,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0061_revisablecluster_revisableclusterchild.py",
      "language": "python",
      "line_count": 69,
      "token_estimate": 519,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 68,
        "comment_ratio": 0.0145,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\urls_multilang.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 77,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.65,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_factories\\__init__.py",
      "language": "python",
      "line_count": 3,
      "token_estimate": 18,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 3,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\permission_policies\\test_collection_permission_policies.py",
      "language": "python",
      "line_count": 1588,
      "token_estimate": 13624,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 129,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 21,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 21,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 79,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 85,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 93,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 99,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 105,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 129 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 129 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 129 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2693,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 195,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 239,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 241,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 78,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 303,
              "description": "Function is 78 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 78 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 78 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0971,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 71,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 382,
              "description": "Function is 71 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 71 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_any_permission_for is 71 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1016,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 454,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 488,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_permission_for",
          "type": "function_definition",
          "line_start": 525,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 525,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_collections_user_has_permission_for is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1009,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 598,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 598,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function test_collections_user_has_any_permission_for is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1078,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 664,
          "line_end": 669,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 712,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 714,
          "line_end": 728,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 730,
          "line_end": 759,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 761,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 761,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_permission_for_instance is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1183,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 850,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 852,
          "line_end": 939,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 88,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 852,
              "description": "Function is 88 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 88 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 88 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.092,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 941,
          "line_end": 1021,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 81,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 941,
              "description": "Function is 81 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 81 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_any_permission_for is 81 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0955,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 1023,
          "line_end": 1055,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 1057,
          "line_end": 1092,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_permission_for",
          "type": "function_definition",
          "line_start": 1094,
          "line_end": 1165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1094,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_collections_user_has_permission_for is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1009,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 1167,
          "line_end": 1229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1167,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function test_collections_user_has_any_permission_for is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1078,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1235,
          "line_end": 1309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1239,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1239,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1278,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1290,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1302,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1235,
              "description": "Function is 75 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 75 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3323,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 1311,
          "line_end": 1322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 1324,
          "line_end": 1344,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1337,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1341,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3856,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 1346,
          "line_end": 1359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 1361,
          "line_end": 1379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_only_superuser_has_permission_for_root_collection",
          "type": "function_definition",
          "line_start": 1381,
          "line_end": 1393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 1395,
          "line_end": 1419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 1421,
          "line_end": 1446,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1429,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1869,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 1448,
          "line_end": 1473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 1475,
          "line_end": 1499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 1501,
          "line_end": 1519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 1521,
          "line_end": 1532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_permission_for",
          "type": "function_definition",
          "line_start": 1534,
          "line_end": 1561,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        },
        {
          "name": "test_collections_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 1563,
          "line_end": 1587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0523,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 41,
        "avg_function_length": 37.1,
        "function_length_stddev": 27.41,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 1555,
        "comment_ratio": 0.0208,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.74,
        "debug_artifacts": [],
        "ai_smell_count": 26,
        "ai_smell_density": 0.01672,
        "structural_uniformity": 0.2613,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.36,
        "mechanical": 87.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_nested_structures.py",
      "language": "python",
      "line_count": 784,
      "token_estimate": 8059,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 63,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 36,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_blocks_and_data_not_operated_on_intact is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2994,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 87,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1708,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 190,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 192,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 165,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_blocks_and_data_not_operated_on_intact is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2994,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 277,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_blocks_and_data_not_operated_on_intact is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.158,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 329,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1708,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 411,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_blocks_and_data_not_operated_on_intact is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.158,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 463,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1655,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 510,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 607,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 562,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_blocks_and_data_not_operated_on_intact is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1655,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 609,
          "line_end": 669,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 609,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1468,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 695,
          "line_end": 703,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 705,
          "line_end": 738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0894,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 740,
          "line_end": 783,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 740,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.169,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 30.78,
        "function_length_stddev": 17.02,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 60,
        "code_lines": 724,
        "comment_ratio": 0.0765,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.38,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.019337,
        "structural_uniformity": 0.4471,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.24,
        "mechanical": 88.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_draft_model.py",
      "language": "python",
      "line_count": 65,
      "token_estimate": 578,
      "functions": [
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 11,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 11,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 14,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_missing_revision_mixin",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1167,
          "ai_signals": []
        },
        {
          "name": "test_incorrect_revision_mixin_order",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1167,
          "ai_signals": []
        },
        {
          "name": "test_correct_model",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 13,
        "function_length_stddev": 5.42,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 62,
        "comment_ratio": 0.0462,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.72,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.112903,
        "structural_uniformity": 0.5834,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.6,
        "mechanical": 70.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_allowed_http_methods.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 331,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 8,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1304,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_options_request_for_default_page",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1304,
          "ai_signals": []
        },
        {
          "name": "test_options_request_for_restricted_page",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1304,
          "ai_signals": []
        },
        {
          "name": "test_invalid_request_method_for_restricted_page",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1304,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.5,
        "function_length_stddev": 1.91,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 33,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6518,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_revision_model.py",
      "language": "python",
      "line_count": 385,
      "token_estimate": 4246,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 23,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 23,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4857,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "create_page",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_can_save_revision",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_get_latest_revision_exists",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_content_type_without_inheritance",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_content_type_with_inheritance",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 85,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 85,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 79,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_content_type_with_inheritance is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3799,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "test_content_type_for_page_model",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 123,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 123,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 129,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 129,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4857,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_as_object",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_as_object_with_page",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_is_latest_revision_newer_creation_date_and_id",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_is_latest_revision_newer_creation_date_older_id",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_is_latest_revision_same_creation_dates",
          "type": "decorated_definition",
          "line_start": 208,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2023-01-19\")"
          ]
        },
        {
          "name": "test_revision_cascade_on_object_delete",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 232,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3024,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision_reuses_log_action_uuid",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_that_is_not_latest",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_from_other_instance",
          "type": "function_definition",
          "line_start": 301,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision_with_user_id",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_with_wrong_user_id",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_with_omitted_user_id",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_anonymous_revision_with_user_id",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1357,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 21,
        "avg_function_length": 16.43,
        "function_length_stddev": 8.7,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 24,
        "code_lines": 361,
        "comment_ratio": 0.0623,
        "comment_what_ratio": 0.2083,
        "naming_avg_length": 8.43,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.027701,
        "structural_uniformity": 0.4702,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.88,
        "mechanical": 89.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_utils.py",
      "language": "python",
      "line_count": 658,
      "token_estimate": 5426,
      "functions": [
        {
          "name": "test_camelcase_to_underscore",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 45,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_string_to_ascii",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 66,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2732,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_behaves_same_as_slugify_for_latin_chars",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2846,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_escapes_non_latin_chars",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 96,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_strings_with_latin_chars",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 125,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2134,
          "ai_signals": []
        },
        {
          "name": "test_strings_with__non_latin_chars",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 134,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_accepts_kwarg",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "target_method",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_basic",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pickleability",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 183,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 183,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 190,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 190,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_find_available_slug",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 214,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_find_available_slug_already_used",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_find_available_slug_ignore_page_id",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_get_content_languages",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_can_be_different_to_django_languages",
          "type": "decorated_definition",
          "line_start": 260,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"de\", \"German\"),\n        ],\n    )"
          ]
        },
        {
          "name": "test_can_be_a_translation_proxy",
          "type": "decorated_definition",
          "line_start": 275,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", _(\"English\")),\n            (\"de\", _(\"German\")),\n        ],\n    )"
          ]
        },
        {
          "name": "test_must_be_subset_of_django_languages",
          "type": "decorated_definition",
          "line_start": 290,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"de\", \"German\"),\n            (\"zh\", \"Chinese\"),\n        ],\n    )"
          ]
        },
        {
          "name": "TestGetContentTypeLabel",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 311,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 314,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 314,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 315,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 319,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 321,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_supported_content_language_variant",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_uses_wagtail_content_languages",
          "type": "decorated_definition",
          "line_start": 361,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"de\", \"German\"),\n        ]\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 398,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 400,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_lookup_language_with_i18n_false",
          "type": "function_definition",
          "line_start": 403,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_language_code_not_in_languages",
          "type": "decorated_definition",
          "line_start": 411,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"zz\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_multigetattr",
          "type": "function_definition",
          "line_start": 443,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_standard_port",
          "type": "function_definition",
          "line_start": 468,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_non_standard_port",
          "type": "function_definition",
          "line_start": 477,
          "line_end": 484,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_server_name_for_wildcard_allowed_hosts",
          "type": "function_definition",
          "line_start": 486,
          "line_end": 490,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 486,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 486,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 487,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 487,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 488,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 488,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deep_update",
          "type": "function_definition",
          "line_start": 494,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_hashes_io",
          "type": "function_definition",
          "line_start": 529,
          "line_end": 532,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_hashes_file",
          "type": "function_definition",
          "line_start": 534,
          "line_end": 548,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_hashes_django_uploaded_file",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_hashes_large_file",
          "type": "decorated_definition",
          "line_start": 560,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": [],
          "decorators": [
            "unittest.skipIf(\n        hasattr(hashlib, \"file_digest\"),\n        reason=\"`file_digest` doesn't support this interface\",\n    )"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 586,
          "line_end": 587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_template_is_overridden_false",
          "type": "function_definition",
          "line_start": 589,
          "line_end": 596,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_template_is_overridden_true",
          "type": "function_definition",
          "line_start": 598,
          "line_end": 617,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_get_main_version",
          "type": "function_definition",
          "line_start": 621,
          "line_end": 630,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 628,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4287,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_tuple_choices",
          "type": "function_definition",
          "line_start": 634,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_grouped_tuple_choices",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 640,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        },
        {
          "name": "test_dictionary_choices",
          "type": "function_definition",
          "line_start": 642,
          "line_end": 657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0787,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 44,
        "avg_function_length": 11.32,
        "function_length_stddev": 7.46,
        "import_count": 20,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 629,
        "comment_ratio": 0.0441,
        "comment_what_ratio": 0.0526,
        "naming_avg_length": 8.81,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.038156,
        "structural_uniformity": 0.3411,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.19,
        "mechanical": 88.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0006_userprofile_prefered_language.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 147,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0014_userprofile_contrast.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 148,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.25,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\test_admin_views.py",
      "language": "python",
      "line_count": 3107,
      "token_estimate": 31112,
      "functions": [
        {
          "name": "test_avatar_provider",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 88,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 93,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 94,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_allows_negative_ids",
          "type": "decorated_definition",
          "line_start": 97,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "unittest.skipIf(\n        settings.AUTH_USER_MODEL == \"emailuser.EmailUser\", \"Negative UUID not possible\"\n    )"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 108,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 108,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 112,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_query_one_field",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 122,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search_query_with_search_backend",
          "type": "decorated_definition",
          "line_start": 125,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 140,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 145,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 150,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"customuser.CustomUser\",\n        \"Only applicable to CustomUser\",\n    )"
          ]
        },
        {
          "name": "test_search_and_filter_by_group",
          "type": "decorated_definition",
          "line_start": 153,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 175,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 179,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"customuser.CustomUser\",\n        \"Only applicable to CustomUser\",\n    )"
          ]
        },
        {
          "name": "test_search_query_multiple_fields",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 185,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 189,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_pagination",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 194,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ordering",
          "type": "function_definition",
          "line_start": 198,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 218,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 222,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3204,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "test_filters",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 230,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 236,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 240,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 247,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 251,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 263,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 267,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 271,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 275,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 279,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 280,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 284,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 289,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 226,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_filters is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_default_buttons",
          "type": "function_definition",
          "line_start": 306,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 308,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_buttons_hook",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 103,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 354,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 363,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 365,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 321,
              "description": "Function is 103 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 103 lines (> 37 dynamic threshold)",
                "impact": "Function test_buttons_hook is 103 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.197,
          "ai_signals": []
        },
        {
          "name": "test_buttons_hook_with_deprecated_class",
          "type": "function_definition",
          "line_start": 425,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 442,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 444,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2503,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_bulk_action_rendered",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 475,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 467,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 468,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 474,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 479,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 493,
          "line_end": 499,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 496,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 499,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 503,
          "line_end": 519,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 524,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 529,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 532,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 539,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 541,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 543,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 563,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 556,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 556,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_with_whitespaced_password",
          "type": "function_definition",
          "line_start": 565,
          "line_end": 579,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_create_with_password_mismatch",
          "type": "function_definition",
          "line_start": 581,
          "line_end": 595,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 589,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 591,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 594,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 594,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_with_password_validation",
          "type": "decorated_definition",
          "line_start": 597,
          "line_end": 629,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 620,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 623,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 628,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 628,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        AUTH_PASSWORD_VALIDATORS=[\n            {\n                \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\"\n            },\n        ],\n    )"
          ]
        },
        {
          "name": "test_create_with_missing_password",
          "type": "function_definition",
          "line_start": 631,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 640,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 642,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 645,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 645,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_password_fields_exist_when_not_required",
          "type": "decorated_definition",
          "line_start": 648,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 653,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)"
          ]
        },
        {
          "name": "test_create_with_password_not_required",
          "type": "decorated_definition",
          "line_start": 657,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 670,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 670,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)"
          ]
        },
        {
          "name": "test_optional_password_is_still_validated",
          "type": "decorated_definition",
          "line_start": 674,
          "line_end": 691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 685,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 687,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 690,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 690,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)"
          ]
        },
        {
          "name": "test_password_still_accepted_when_optional",
          "type": "decorated_definition",
          "line_start": 693,
          "line_end": 708,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 706,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 706,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_REQUIRED=False)"
          ]
        },
        {
          "name": "test_password_fields_not_shown_when_disabled",
          "type": "decorated_definition",
          "line_start": 710,
          "line_end": 717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 715,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)"
          ]
        },
        {
          "name": "test_password_fields_ignored_when_disabled",
          "type": "decorated_definition",
          "line_start": 719,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 731,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 731,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)"
          ]
        },
        {
          "name": "test_before_create_user_hook",
          "type": "function_definition",
          "line_start": 735,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 743,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_create_user_hook_post",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 755,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3793,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_after_create_user_hook",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 768,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 760,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 760,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 768,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 772,
          "line_end": 783,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 785,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 795,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 797,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 800,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 801,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 804,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 809,
          "line_end": 823,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 816,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 816,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_cannot_delete_self",
          "type": "function_definition",
          "line_start": 825,
          "line_end": 835,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 834,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 834,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_can_delete_other_superuser",
          "type": "function_definition",
          "line_start": 837,
          "line_end": 852,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 842,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 851,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 851,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_delete_user_hook",
          "type": "function_definition",
          "line_start": 854,
          "line_end": 867,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 867,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_before_delete_user_hook_post",
          "type": "function_definition",
          "line_start": 869,
          "line_end": 882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 882,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_after_delete_user_hook",
          "type": "function_definition",
          "line_start": 884,
          "line_end": 897,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 897,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 899,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 946,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 952,
          "line_end": 971,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 960,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 963,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 967,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 973,
          "line_end": 979,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 978,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 979,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_delete",
          "type": "function_definition",
          "line_start": 981,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 990,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 990,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_cannot_delete_self",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 1003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1002,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1002,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_cannot_delete_superuser",
          "type": "function_definition",
          "line_start": 1005,
          "line_end": 1013,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1013,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1013,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1045,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1047,
          "line_end": 1051,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1053,
          "line_end": 1058,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1060,
          "line_end": 1089,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1063,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1070,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1072,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1074,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1077,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonexistent_redirect",
          "type": "function_definition",
          "line_start": 1091,
          "line_end": 1097,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple_post",
          "type": "function_definition",
          "line_start": 1099,
          "line_end": 1130,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1105,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1105,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1119,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3892,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_password_optional",
          "type": "function_definition",
          "line_start": 1132,
          "line_end": 1144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1142,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1142,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_passwords_match",
          "type": "function_definition",
          "line_start": 1146,
          "line_end": 1161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1154,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1156,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1159,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1159,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_with_password_validation",
          "type": "decorated_definition",
          "line_start": 1163,
          "line_end": 1196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1186,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1189,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1194,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1194,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        AUTH_PASSWORD_VALIDATORS=[\n            {\n                \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\"\n            },\n        ],\n    )"
          ]
        },
        {
          "name": "test_edit_and_deactivate",
          "type": "function_definition",
          "line_start": 1198,
          "line_end": 1213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1208,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1208,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_and_make_superuser",
          "type": "function_definition",
          "line_start": 1215,
          "line_end": 1229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1224,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1224,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_self",
          "type": "function_definition",
          "line_start": 1231,
          "line_end": 1262,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1256,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1256,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2799,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_editing_own_password_does_not_log_out",
          "type": "function_definition",
          "line_start": 1264,
          "line_end": 1293,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1288,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1288,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2944,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_cannot_demote_self",
          "type": "function_definition",
          "line_start": 1295,
          "line_end": 1331,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1325,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1325,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2503,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_edit_validation_error",
          "type": "decorated_definition",
          "line_start": 1333,
          "line_end": 1352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "unittest.skipIf(\n        settings.AUTH_USER_MODEL == \"emailuser.EmailUser\", \"Not applicable to EmailUser\"\n    )"
          ]
        },
        {
          "name": "test_password_fields_not_shown_when_disabled",
          "type": "decorated_definition",
          "line_start": 1354,
          "line_end": 1361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1359,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)"
          ]
        },
        {
          "name": "test_password_fields_ignored_when_disabled",
          "type": "decorated_definition",
          "line_start": 1363,
          "line_end": 1377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1375,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1375,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILUSERS_PASSWORD_ENABLED=False)"
          ]
        },
        {
          "name": "test_before_edit_user_hook",
          "type": "function_definition",
          "line_start": 1379,
          "line_end": 1392,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1392,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_before_edit_user_hook_post",
          "type": "function_definition",
          "line_start": 1394,
          "line_end": 1408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1408,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2944,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_after_edit_user_hook_post",
          "type": "function_definition",
          "line_start": 1410,
          "line_end": 1424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1424,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2944,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1428,
          "line_end": 1429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1431,
          "line_end": 1440,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_without_permission",
          "type": "function_definition",
          "line_start": 1442,
          "line_end": 1452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1446,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1448,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_minimal_permission",
          "type": "function_definition",
          "line_start": 1454,
          "line_end": 1479,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1459,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1462,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1470,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1483,
          "line_end": 1488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_user_created_without_profile",
          "type": "function_definition",
          "line_start": 1490,
          "line_end": 1493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_user_profile_created_when_method_called",
          "type": "function_definition",
          "line_start": 1495,
          "line_end": 1498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_avatar_empty_on_profile_creation",
          "type": "function_definition",
          "line_start": 1500,
          "line_end": 1502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1506,
          "line_end": 1519,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1510,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1513,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1517,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_cannot_escalate_privileges",
          "type": "function_definition",
          "line_start": 1521,
          "line_end": 1565,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1557,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1557,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1521,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_cannot_escalate_privileges is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2944,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1571,
          "line_end": 1580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1582,
          "line_end": 1583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1585,
          "line_end": 1591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 1597,
          "line_end": 1606,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1608,
          "line_end": 1609,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1611,
          "line_end": 1624,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1619,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3111,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_describe_on_delete",
          "type": "function_definition",
          "line_start": 1626,
          "line_end": 1643,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1634,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2555,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1647,
          "line_end": 1648,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1650,
          "line_end": 1651,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1653,
          "line_end": 1662,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1656,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1657,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1661,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1661,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 1664,
          "line_end": 1667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1664,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1664,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1667,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_default_ordering",
          "type": "function_definition",
          "line_start": 1669,
          "line_end": 1676,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1675,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1675,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1680,
          "line_end": 1681,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1683,
          "line_end": 1684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1686,
          "line_end": 1691,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1689,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1691,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_search",
          "type": "function_definition",
          "line_start": 1693,
          "line_end": 1696,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1693,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1693,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1700,
          "line_end": 1707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1703,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1706,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1709,
          "line_end": 1710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1712,
          "line_end": 1729,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1727,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2555,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 1731,
          "line_end": 1744,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1734,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1737,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1738,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1740,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1743,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 1746,
          "line_end": 1750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_create_group",
          "type": "function_definition",
          "line_start": 1752,
          "line_end": 1760,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_create_adding_permissions",
          "type": "function_definition",
          "line_start": 1762,
          "line_end": 1787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_duplicate_page_permissions_error",
          "type": "function_definition",
          "line_start": 1789,
          "line_end": 1804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1804,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2799,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_duplicate_document_permissions_error",
          "type": "function_definition",
          "line_start": 1806,
          "line_end": 1829,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1827,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1827,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3528,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_can_submit_blank_permission_form",
          "type": "function_definition",
          "line_start": 1831,
          "line_end": 1853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_custom_permissions_hidden",
          "type": "function_definition",
          "line_start": 1855,
          "line_end": 1872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1866,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1872,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_permissions_shown",
          "type": "function_definition",
          "line_start": 1874,
          "line_end": 1877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1877,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_show_mixin_permissions",
          "type": "function_definition",
          "line_start": 1879,
          "line_end": 1918,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1881,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1897,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1901,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1905,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1908,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1913,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1914,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1915,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1879,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_mixin_permissions is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_strip_model_name_from_custom_permissions",
          "type": "function_definition",
          "line_start": 1920,
          "line_end": 1936,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1923,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.267,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_permission_with_same_action",
          "type": "function_definition",
          "line_start": 1938,
          "line_end": 1975,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1945,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1948,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1953,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1938,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_permission_with_same_action is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_other_permissions_with_wagtail_admin_content_type",
          "type": "function_definition",
          "line_start": 1977,
          "line_end": 2014,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1983,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1983,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1998,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2008,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2009,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2011,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2013,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1977,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_other_permissions_with_wagtail_admin_content_type is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_formset_data_attributes",
          "type": "function_definition",
          "line_start": 2016,
          "line_end": 2057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2018,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2016,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_formset_data_attributes is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2278,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2061,
          "line_end": 2095,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2072,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2077,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2083,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2086,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2097,
          "line_end": 2101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 2103,
          "line_end": 2129,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "add_non_registered_perm",
          "type": "function_definition",
          "line_start": 2131,
          "line_end": 2141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2141,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3793,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2143,
          "line_end": 2169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2146,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2151,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2153,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2155,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2158,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2161,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 2171,
          "line_end": 2175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_nonexistent_group_redirect",
          "type": "function_definition",
          "line_start": 2177,
          "line_end": 2178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_edit",
          "type": "function_definition",
          "line_start": 2180,
          "line_end": 2205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2194,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1957,
          "ai_signals": []
        },
        {
          "name": "test_group_edit_validation_error",
          "type": "function_definition",
          "line_start": 2207,
          "line_end": 2212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_edit_adding_page_permissions_same_page",
          "type": "function_definition",
          "line_start": 2214,
          "line_end": 2230,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_edit_adding_document_permissions_same_collection",
          "type": "function_definition",
          "line_start": 2232,
          "line_end": 2258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2238,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2255,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3204,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "test_group_edit_adding_document_permissions_different_collection",
          "type": "function_definition",
          "line_start": 2260,
          "line_end": 2288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2266,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2285,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3025,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "test_group_edit_deleting_page_permissions",
          "type": "function_definition",
          "line_start": 2290,
          "line_end": 2302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_edit_deleting_document_permissions",
          "type": "function_definition",
          "line_start": 2304,
          "line_end": 2326,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2308,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2323,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3654,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_group_edit_loads_with_django_permissions_shown",
          "type": "function_definition",
          "line_start": 2328,
          "line_end": 2338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 2332,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_input_schema",
              "severity": "medium",
              "line": 2332,
              "description": "Model serving without input schema \u2014 invalid requests not caught",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2336,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_group_edit_displays_collection_nesting",
          "type": "function_definition",
          "line_start": 2340,
          "line_end": 2350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 2345,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3793,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_group_edit_loads_with_page_permissions_shown",
          "type": "function_definition",
          "line_start": 2352,
          "line_end": 2418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2358,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2379,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2402,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2352,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_group_edit_loads_with_page_permissions_shown is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2701,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "test_duplicate_page_permissions_error",
          "type": "function_definition",
          "line_start": 2420,
          "line_end": 2432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2432,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3303,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_duplicate_document_permissions_error",
          "type": "function_definition",
          "line_start": 2434,
          "line_end": 2451,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 2449,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2449,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_group_add_registered_django_permissions",
          "type": "function_definition",
          "line_start": 2453,
          "line_end": 2460,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_retains_non_registered_permissions_when_editing",
          "type": "function_definition",
          "line_start": 2462,
          "line_end": 2474,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_retains_non_registered_permissions_when_adding",
          "type": "function_definition",
          "line_start": 2476,
          "line_end": 2486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_group_retains_non_registered_permissions_when_deleting",
          "type": "function_definition",
          "line_start": 2488,
          "line_end": 2495,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_is_custom_permission_checked",
          "type": "function_definition",
          "line_start": 2497,
          "line_end": 2517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2500,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2504,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3944,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_show_mixin_permissions",
          "type": "function_definition",
          "line_start": 2519,
          "line_end": 2558,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2521,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2537,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2541,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2545,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2548,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2553,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2554,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2555,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2519,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_mixin_permissions is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_group_edit_loads_with_django_permissions_in_order",
          "type": "function_definition",
          "line_start": 2560,
          "line_end": 2628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2569,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2577,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2595,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2610,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2560,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_group_edit_loads_with_django_permissions_in_order is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3147,
          "ai_signals": [
            "High anti-pattern density (0.72)"
          ]
        },
        {
          "name": "test_data_attributes_for_bulk_selection",
          "type": "function_definition",
          "line_start": 2630,
          "line_end": 2654,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2632,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2011,
          "ai_signals": []
        },
        {
          "name": "test_formset_data_attributes",
          "type": "function_definition",
          "line_start": 2656,
          "line_end": 2707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2658,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2656,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_formset_data_attributes is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1957,
          "ai_signals": []
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 2713,
          "line_end": 2716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2718,
          "line_end": 2719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2721,
          "line_end": 2727,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2731,
          "line_end": 2733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls",
          "type": "function_definition",
          "line_start": 2735,
          "line_end": 2739,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls_with_custom_form",
          "type": "function_definition",
          "line_start": 2741,
          "line_end": 2752,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls_custom_form_invalid_value",
          "type": "function_definition",
          "line_start": 2754,
          "line_end": 2763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls_custom_form_does_not_exist",
          "type": "function_definition",
          "line_start": 2765,
          "line_end": 2776,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2780,
          "line_end": 2782,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls_default",
          "type": "decorated_definition",
          "line_start": 2784,
          "line_end": 2792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"emailuser.EmailUser\",\n        \"Test only applies to EmailUser model\",\n    )"
          ]
        },
        {
          "name": "test_get_viewset_cls_custom",
          "type": "decorated_definition",
          "line_start": 2794,
          "line_end": 2804,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": [],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"customuser.CustomUser\",\n        \"Test only applies to CustomUser model\",\n    )"
          ]
        },
        {
          "name": "test_get_viewset_cls_custom_and_check_ordering",
          "type": "function_definition",
          "line_start": 2806,
          "line_end": 2808,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2808,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2808,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_viewset_cls_custom_form_invalid_value",
          "type": "function_definition",
          "line_start": 2810,
          "line_end": 2819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_get_viewset_cls_custom_form_does_not_exist",
          "type": "function_definition",
          "line_start": 2821,
          "line_end": 2832,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_registered_permissions",
          "type": "function_definition",
          "line_start": 2834,
          "line_end": 2843,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2835,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2835,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2837,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2847,
          "line_end": 2850,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2849,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2852,
          "line_end": 2853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2855,
          "line_end": 2862,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2860,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised",
          "type": "function_definition",
          "line_start": 2864,
          "line_end": 2875,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2865,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2868,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2872,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2879,
          "line_end": 2897,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2881,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2453,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2899,
          "line_end": 2900,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 2902,
          "line_end": 2903,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "gain_permissions",
          "type": "function_definition",
          "line_start": 2905,
          "line_end": 2911,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2908,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2913,
          "line_end": 2920,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2918,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised",
          "type": "function_definition",
          "line_start": 2922,
          "line_end": 2926,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2926,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unauthorised_post",
          "type": "function_definition",
          "line_start": 2928,
          "line_end": 2937,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2933,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2936,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2936,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised_post",
          "type": "function_definition",
          "line_start": 2939,
          "line_end": 2944,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2943,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2943,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2948,
          "line_end": 2974,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2950,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.1907,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 2976,
          "line_end": 2980,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 2982,
          "line_end": 2986,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "gain_permissions",
          "type": "function_definition",
          "line_start": 2988,
          "line_end": 2994,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2991,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 2996,
          "line_end": 3003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3001,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised_get",
          "type": "function_definition",
          "line_start": 3005,
          "line_end": 3009,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3009,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unauthorised_post",
          "type": "function_definition",
          "line_start": 3011,
          "line_end": 3021,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3016,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3019,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3019,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised_post",
          "type": "function_definition",
          "line_start": 3023,
          "line_end": 3029,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3027,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3027,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3033,
          "line_end": 3041,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3035,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 3043,
          "line_end": 3046,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 3048,
          "line_end": 3051,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0611,
          "ai_signals": []
        },
        {
          "name": "gain_permissions",
          "type": "function_definition",
          "line_start": 3053,
          "line_end": 3059,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3056,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 3061,
          "line_end": 3068,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3066,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised_get",
          "type": "function_definition",
          "line_start": 3070,
          "line_end": 3074,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3074,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_unauthorised_post",
          "type": "function_definition",
          "line_start": 3076,
          "line_end": 3085,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3081,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3084,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3084,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_authorised_post",
          "type": "function_definition",
          "line_start": 3087,
          "line_end": 3092,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3091,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3091,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_registered_user_permissions",
          "type": "function_definition",
          "line_start": 3096,
          "line_end": 3106,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3097,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3097,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3100,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4111,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 192,
        "avg_function_length": 14.58,
        "function_length_stddev": 13.63,
        "import_count": 37,
        "export_count": 0,
        "comment_lines": 283,
        "code_lines": 2824,
        "comment_ratio": 0.0911,
        "comment_what_ratio": 0.2405,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 290,
        "ai_smell_density": 0.102691,
        "structural_uniformity": 0.065,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.37,
        "mechanical": 72.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\wagtail_hooks.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 298,
      "functions": [
        {
          "name": "get_viewset_cls",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 16,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5594,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.92)"
          ]
        },
        {
          "name": "register_viewset",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 29,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 30,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5594,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.92)"
          ],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 8.5,
        "function_length_stddev": 0.71,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.56,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.9168,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.67,
        "mechanical": 77.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\registry.py",
      "language": "python",
      "line_count": 92,
      "token_estimate": 857,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1366,
          "ai_signals": []
        },
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1366,
          "ai_signals": []
        },
        {
          "name": "get_by_type",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 30,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 34,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4866,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1366,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1366,
          "ai_signals": []
        },
        {
          "name": "register",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1366,
          "ai_signals": []
        },
        {
          "name": "foreign_key_lookup",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 83,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4058,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 8.29,
        "function_length_stddev": 2.63,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 71,
        "comment_ratio": 0.2283,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.89,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.056338,
        "structural_uniformity": 0.6829,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.2,
        "mechanical": 79.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\version.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 388,
      "functions": [
        {
          "name": "get_version",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1241,
          "ai_signals": []
        },
        {
          "name": "get_main_version",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1241,
          "ai_signals": []
        },
        {
          "name": "get_complete_version",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1241,
          "ai_signals": []
        },
        {
          "name": "get_semver_version",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1241,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 11.25,
        "function_length_stddev": 4.27,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 44,
        "comment_ratio": 0.2,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.18,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6203,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.12,
        "mechanical": 94.12,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\delete_page.py",
      "language": "python",
      "line_count": 60,
      "token_estimate": 494,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0543,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0543,
          "ai_signals": []
        },
        {
          "name": "_delete_page",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 36,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2487,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0543,
          "ai_signals": []
        },
        {
          "name": "log_deletion",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0543,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 8.2,
        "function_length_stddev": 5.97,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 52,
        "comment_ratio": 0.1333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.79,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.019231,
        "structural_uniformity": 0.2713,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.89,
        "mechanical": 91.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\action_menu.py",
      "language": "python",
      "line_count": 351,
      "token_estimate": 3070,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_user_page_permissions_tester",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 59,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2188,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 129,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 146,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_get_base_page_action_menu_items",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 260,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1522,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 5,
            "parameter_count": 2,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 292,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 292,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 300,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 304,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 317,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 322,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 271,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 271 in __init__ makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 271,
              "description": "Function is 53 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 15 dynamic threshold)",
                "impact": "Function __init__ is 53 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 345,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 348,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 10.74,
        "function_length_stddev": 11.19,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 329,
        "comment_ratio": 0.0627,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.34,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.048632,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.08,
        "mechanical": 82.08,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\copy_for_translation.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 461,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1877,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.94)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 45,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 47,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5377,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.94)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 11.5,
        "function_length_stddev": 0.71,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 52,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.67,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.038462,
        "structural_uniformity": 0.9385,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.43,
        "mechanical": 88.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\serializers.py",
      "language": "python",
      "line_count": 193,
      "token_estimate": 1237,
      "functions": [
        {
          "name": "get_model_listing_url",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0398,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 6.64,
        "function_length_stddev": 5.32,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 76,
        "code_lines": 117,
        "comment_ratio": 0.3938,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.41,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.199,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.5,
        "mechanical": 99.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\datetimepicker.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 220,
      "functions": [
        {
          "name": "to_datetimepicker_format",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 35,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1029,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 34,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 33,
        "comment_ratio": 0.1538,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.89,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.030303,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.72,
        "mechanical": 79.72,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\formsets.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 305,
      "functions": [
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 13,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0958,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "management_form",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.365,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9.5,
        "function_length_stddev": 4.95,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 28,
        "comment_ratio": 0.1515,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.95,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.035714,
        "structural_uniformity": 0.479,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.07,
        "mechanical": 91.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\jinja2tags.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 107,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.52,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0004_editingsession.py",
      "language": "python",
      "line_count": 58,
      "token_estimate": 457,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 57,
        "comment_ratio": 0.0172,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.01,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\__init__.py",
      "language": "python",
      "line_count": 22,
      "token_estimate": 213,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 4,
              "description": "Unused import: from wagtail.admin.forms.models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'DIRECT_FORM_FIELD_OVERRIDES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.forms.models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 4,
              "description": "Unused import: from wagtail.admin.forms.models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n)",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'FORM_FIELD_OVERRIDES' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.admin.forms.models import (  # NOQA: F401\n    DIRECT_FORM_FIELD_OVERRIDES,\n    FORM_FIELD_OVERRIDES,\n)",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 19,
        "comment_ratio": 0.1364,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 2
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\multiple_chooser_panel.py",
      "language": "python",
      "line_count": 57,
      "token_estimate": 491,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0989,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0989,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 35,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 36,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4489,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 43,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4489,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0989,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 54,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 56,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4489,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 6,
        "function_length_stddev": 3.03,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 57,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.49,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.070175,
        "structural_uniformity": 0.4945,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.62,
        "mechanical": 80.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\converters\\contentstate.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1231,
      "functions": [
        {
          "name": "link_entity",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "br",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "block_fallback",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "entity_fallback",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "style_fallback",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "persist_key_for_block",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 84,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1601,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_human_in_loop_no_interrupt",
              "severity": "high",
              "line": 113,
              "description": "Human-in-the-loop workflow without interrupt_before -- auto-executes dangerous actions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 120,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 95,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function __init__ is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3013,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "from_database_format",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0571,
          "ai_signals": []
        },
        {
          "name": "to_database_format",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 149,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 149,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4071,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 13.11,
        "function_length_stddev": 14.98,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 140,
        "comment_ratio": 0.0667,
        "comment_what_ratio": 0.2857,
        "naming_avg_length": 7.8,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.042857,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.3,
        "mechanical": 85.3,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\search.py",
      "language": "python",
      "line_count": 143,
      "token_estimate": 1122,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 7,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 17,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 25,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__lt__",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__le__",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 45,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__gt__",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__ge__",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 55,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2287,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "is_active",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2287,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 84,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.462,
          "ai_signals": [
            "High anti-pattern density (0.67)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2287,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "registered_search_areas",
          "type": "decorated_definition",
          "line_start": 97,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2287,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_items_for_request",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2287,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "active_search",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 104,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 104,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 111,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 114,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 129,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 133,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5787,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 7.07,
        "function_length_stddev": 6.05,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 137,
        "comment_ratio": 0.042,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 7.15,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.10219,
        "structural_uniformity": 0.1435,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.37,
        "mechanical": 71.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.ba-throttle-debounce.min.js",
      "language": "javascript",
      "line_count": 9,
      "token_estimate": 182,
      "functions": [
        {
          "name": "g",
          "type": "function_declaration",
          "line_start": 9,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 9,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 9 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "react-conditional-rendering-anti-pattern",
              "severity": "medium",
              "line": 9,
              "description": "Complex nested ternary or && chain for conditional rendering - hard to read and error-prone",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 1,
        "comment_ratio": 0.8889,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.86,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 2.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 49.0,
        "mechanical": 49.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\button.stories.tsx",
      "language": "tsx",
      "line_count": 361,
      "token_estimate": 2537,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 7,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 350,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 7,
              "description": "Function is 350 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 350 lines (> 37 dynamic threshold)",
                "impact": "Function Template is 350 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 12,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 22,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 30,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 40,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 54,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 67,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 82,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 108,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 143,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 175,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 211,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 227,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 244,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 261,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 341,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-xss-in-href",
              "severity": "critical",
              "line": 347,
              "description": "User-provided data used in href attribute without sanitization - javascript: URI injection enables XSS",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.17,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 350,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 361,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.56,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.047091,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.23,
        "mechanical": 73.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templatetags\\wagtailadmin_tags.py",
      "language": "python",
      "line_count": 1441,
      "token_estimate": 12249,
      "functions": [
        {
          "name": "breadcrumbs",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/breadcrumbs.html\")"
          ]
        },
        {
          "name": "page_breadcrumbs",
          "type": "decorated_definition",
          "line_start": 77,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 10,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1352,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/breadcrumbs.html\", takes_context=True)"
          ]
        },
        {
          "name": "search_other",
          "type": "decorated_definition",
          "line_start": 115,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/search_other.html\", takes_context=True)"
          ]
        },
        {
          "name": "ellipsistrim",
          "type": "decorated_definition",
          "line_start": 125,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter(\"ellipsistrim\")"
          ]
        },
        {
          "name": "fieldtype",
          "type": "decorated_definition",
          "line_start": 135,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 139,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 142,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "widgettype",
          "type": "decorated_definition",
          "line_start": 146,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 150,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 153,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "page_permissions",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "is_page",
          "type": "decorated_definition",
          "line_start": 167,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "admin_edit_url",
          "type": "decorated_definition",
          "line_start": 178,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "admin_url_name",
          "type": "decorated_definition",
          "line_start": 195,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "build_absolute_url",
          "type": "decorated_definition",
          "line_start": 208,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "latest_str",
          "type": "decorated_definition",
          "line_start": 238,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "classnames",
          "type": "decorated_definition",
          "line_start": 248,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 256,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2713,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "test_collection_is_public",
          "type": "decorated_definition",
          "line_start": 265,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag()"
          ]
        },
        {
          "name": "test_page_is_public",
          "type": "decorated_definition",
          "line_start": 276,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "hook_output",
          "type": "decorated_definition",
          "line_start": 300,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "base_url_setting",
          "type": "decorated_definition",
          "line_start": 313,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "allow_unicode_slugs",
          "type": "decorated_definition",
          "line_start": 318,
          "line_end": 320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "render_with_errors",
          "type": "decorated_definition",
          "line_start": 325,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 354,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 356,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2501,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "has_unrendered_errors",
          "type": "decorated_definition",
          "line_start": 360,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 363,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "cautious_slugify",
          "type": "decorated_definition",
          "line_start": 371,
          "line_end": 374,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter(is_safe=True)",
            "stringfilter"
          ]
        },
        {
          "name": "querystring",
          "type": "decorated_definition",
          "line_start": 377,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 393,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1779,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "pagination_querystring",
          "type": "decorated_definition",
          "line_start": 404,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "paginate",
          "type": "decorated_definition",
          "line_start": 416,
          "line_end": 447,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\n    \"wagtailadmin/pages/listing/_pagination.html\", takes_context=True\n)"
          ]
        },
        {
          "name": "page_listing_buttons",
          "type": "decorated_definition",
          "line_start": 450,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 456,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 460,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 470,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/buttons.html\", takes_context=True)"
          ]
        },
        {
          "name": "page_header_buttons",
          "type": "decorated_definition",
          "line_start": 476,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 484,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 490,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2379,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ],
          "decorators": [
            "register.inclusion_tag(\n    \"wagtailadmin/pages/listing/_page_header_buttons.html\", takes_context=True\n)"
          ]
        },
        {
          "name": "bulk_action_choices",
          "type": "decorated_definition",
          "line_start": 513,
          "line_end": 561,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 514,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 516,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 516,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 516,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 529,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 531,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 540,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 545,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 548,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 551,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 513,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function bulk_action_choices is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/buttons.html\", takes_context=True)"
          ]
        },
        {
          "name": "avatar",
          "type": "decorated_definition",
          "line_start": 564,
          "line_end": 593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/avatar.html\")"
          ]
        },
        {
          "name": "message_level_tag",
          "type": "decorated_definition",
          "line_start": 596,
          "line_end": 603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "message_tags",
          "type": "decorated_definition",
          "line_start": 606,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "_abs",
          "type": "decorated_definition",
          "line_start": 619,
          "line_end": 621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter(\"abs\")"
          ]
        },
        {
          "name": "admin_urlquote",
          "type": "decorated_definition",
          "line_start": 624,
          "line_end": 626,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "avatar_url",
          "type": "decorated_definition",
          "line_start": 629,
          "line_end": 660,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 644,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1473,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "admin_theme_classname",
          "type": "decorated_definition",
          "line_start": 663,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "admin_theme_color_scheme",
          "type": "decorated_definition",
          "line_start": 688,
          "line_end": 698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "absolute_static",
          "type": "decorated_definition",
          "line_start": 701,
          "line_end": 708,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "versioned_static",
          "type": "decorated_definition",
          "line_start": 711,
          "line_end": 717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "icon",
          "type": "decorated_definition",
          "line_start": 720,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 732,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1838,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/icon.html\", takes_context=False)"
          ]
        },
        {
          "name": "status",
          "type": "decorated_definition",
          "line_start": 746,
          "line_end": 778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 748,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 752,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 760,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 762,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 765,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 766,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 772,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 775,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/status_tag.html\")"
          ]
        },
        {
          "name": "timesince_simple",
          "type": "decorated_definition",
          "line_start": 781,
          "line_end": 792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter()"
          ]
        },
        {
          "name": "timesince_last_update",
          "type": "decorated_definition",
          "line_start": 795,
          "line_end": 855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 797,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 801,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 827,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 795,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function timesince_last_update is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2674,
          "ai_signals": [
            "High anti-pattern density (0.66)"
          ],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "user_display_name",
          "type": "decorated_definition",
          "line_start": 858,
          "line_end": 860,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "format_content_type",
          "type": "decorated_definition",
          "line_start": 863,
          "line_end": 865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 865,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.filter"
          ]
        },
        {
          "name": "i18n_enabled",
          "type": "decorated_definition",
          "line_start": 868,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "locale_label_from_id",
          "type": "decorated_definition",
          "line_start": 873,
          "line_end": 878,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 874,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "sidebar_collapsed",
          "type": "decorated_definition",
          "line_start": 881,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "sidebar_props",
          "type": "decorated_definition",
          "line_start": 890,
          "line_end": 922,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "get_comments_enabled",
          "type": "decorated_definition",
          "line_start": 925,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "wagtail_config",
          "type": "decorated_definition",
          "line_start": 930,
          "line_end": 970,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 930,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function wagtail_config is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1233,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "resolve_url",
          "type": "decorated_definition",
          "line_start": 973,
          "line_end": 984,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 988,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 1002,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "fragment",
          "type": "decorated_definition",
          "line_start": 1005,
          "line_end": 1052,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1045,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1005,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function fragment is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1838,
          "ai_signals": [],
          "decorators": [
            "register.tag(name=\"fragment\")"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1080,
          "line_end": 1084,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1086,
          "line_end": 1087,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 1089,
          "line_end": 1107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "decorated_definition",
          "line_start": 1109,
          "line_end": 1123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1129,
          "line_end": 1151,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": []
        },
        {
          "name": "formattedfield",
          "type": "decorated_definition",
          "line_start": 1193,
          "line_end": 1277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 14,
            "line_count": 85,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1198,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1199,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1200,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1205,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1215,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1216,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1217,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1218,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1223,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1229,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1235,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1236,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1241,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1242,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1243,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1251,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1252,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1193,
              "description": "Function is 85 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 85 lines (> 37 dynamic threshold)",
                "impact": "Function formattedfield is 85 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/formatted_field.html\")"
          ]
        },
        {
          "name": "formattedfieldfromcontext",
          "type": "decorated_definition",
          "line_start": 1280,
          "line_end": 1304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1291,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1292,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1293,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1298,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/formatted_field.html\", takes_context=True)"
          ]
        },
        {
          "name": "dialog_toggle",
          "type": "decorated_definition",
          "line_start": 1315,
          "line_end": 1325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/dialog/dialog_toggle.html\")"
          ]
        },
        {
          "name": "workflow_status_with_date",
          "type": "decorated_definition",
          "line_start": 1328,
          "line_end": 1343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.simple_tag()"
          ]
        },
        {
          "name": "keyboard_shortcuts_dialog",
          "type": "decorated_definition",
          "line_start": 1346,
          "line_end": 1418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 1367,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 1368,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 1368,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1369,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1346,
              "description": "Function is 73 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 37 dynamic threshold)",
                "impact": "Function keyboard_shortcuts_dialog is 73 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2777,
          "ai_signals": [
            "High anti-pattern density (0.68)"
          ],
          "decorators": [
            "register.inclusion_tag(\n    \"wagtailadmin/shared/keyboard_shortcuts_dialog.html\",\n    takes_context=True,\n)"
          ]
        },
        {
          "name": "human_readable_date",
          "type": "decorated_definition",
          "line_start": 1421,
          "line_end": 1432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0379,
          "ai_signals": [],
          "decorators": [
            "register.inclusion_tag(\"wagtailadmin/shared/human_readable_date.html\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 64,
        "avg_function_length": 18.22,
        "function_length_stddev": 17.15,
        "import_count": 44,
        "export_count": 0,
        "comment_lines": 335,
        "code_lines": 1106,
        "comment_ratio": 0.2325,
        "comment_what_ratio": 0.1311,
        "naming_avg_length": 7.43,
        "debug_artifacts": [],
        "ai_smell_count": 72,
        "ai_smell_density": 0.065099,
        "structural_uniformity": 0.0586,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.92,
        "mechanical": 80.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\api\\utils.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 65,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 3,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 11,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_bulk_actions\\test_bulk_move.py",
      "language": "python",
      "line_count": 353,
      "token_estimate": 3220,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1796,
          "ai_signals": []
        },
        {
          "name": "test_bulk_move",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 96,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3497,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_bulk_move_bad_permissions",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 114,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 124,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 128,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4809,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_user_without_bulk_delete_permission_can_move",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 141,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 141,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_bulk_move_destination_not_allowed",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 168,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4491,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_bulk_move_slug_already_taken",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 197,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 203,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3809,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_bulk_move_triggers_signals",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 214,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_bulk_move_triggers_signals is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1903,
          "ai_signals": []
        },
        {
          "name": "test_before_bulk_move_hook",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 296,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 279,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 288,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4353,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_after_bulk_move_hook",
          "type": "function_definition",
          "line_start": 298,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 303,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 312,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4226,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_bulk_move_with_restricted_parent_page_types",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 341,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2476,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 32.5,
        "function_length_stddev": 18.06,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 334,
        "comment_ratio": 0.0538,
        "comment_what_ratio": 0.2105,
        "naming_avg_length": 7.42,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.050898,
        "structural_uniformity": 0.4442,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.98,
        "mechanical": 77.98,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_delete_page.py",
      "language": "python",
      "line_count": 397,
      "token_estimate": 4091,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "test_page_delete",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "test_confirm_delete_scenario_1",
          "type": "decorated_definition",
          "line_start": 48,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=10)"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_2",
          "type": "decorated_definition",
          "line_start": 72,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=3)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_3",
          "type": "decorated_definition",
          "line_start": 94,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 110,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 110,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4082,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=3)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        },
        {
          "name": "test_confirm_delete_scenario_4",
          "type": "decorated_definition",
          "line_start": 120,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT=3)",
            "override_settings(WAGTAIL_SITE_NAME=\"mysite\")"
          ]
        },
        {
          "name": "test_page_delete_specific_admin_title",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "test_page_delete_bad_permissions",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 157,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3032,
          "ai_signals": []
        },
        {
          "name": "test_page_delete_post",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 173,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_delete_post is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2203,
          "ai_signals": []
        },
        {
          "name": "test_page_delete_notlive_post",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 212,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_delete_notlive_post is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2157,
          "ai_signals": []
        },
        {
          "name": "test_subpage_deletion",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 324,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 253,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_subpage_deletion is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1768,
          "ai_signals": []
        },
        {
          "name": "test_before_delete_page_hook",
          "type": "function_definition",
          "line_start": 326,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 339,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3782,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_before_delete_page_hook_post",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 354,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_after_delete_page_hook",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 372,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 391,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3032,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 15,
        "avg_function_length": 24.13,
        "function_length_stddev": 15.99,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 56,
        "code_lines": 341,
        "comment_ratio": 0.1411,
        "comment_what_ratio": 0.3036,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.029326,
        "structural_uniformity": 0.3372,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.03,
        "mechanical": 87.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_preview.py",
      "language": "python",
      "line_count": 1192,
      "token_estimate": 11630,
      "functions": [
        {
          "name": "test_issue_2599",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 60,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 68,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 72,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 73,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 74,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 34,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_issue_2599 is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "clear_edit_handler",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 97,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2914,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_with_no_form_data",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 155,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 166,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4673,
          "ai_signals": [
            "High anti-pattern density (0.74)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_with_invalid_data",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 187,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 201,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 212,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 168,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_create_with_invalid_data is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5192,
          "ai_signals": [
            "High anti-pattern density (0.89)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_with_m2m_field",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 238,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.458,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_with_incorrect_site_hostname",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 257,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 271,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4268,
          "ai_signals": [
            "High anti-pattern density (0.62)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_with_deferred_required_fields",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 321,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 306,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 320,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 276,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_create_with_deferred_required_fields is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4363,
          "ai_signals": [
            "High anti-pattern density (0.65)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_without_title_and_slug",
          "type": "function_definition",
          "line_start": 323,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 351,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 365,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 323,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_create_without_title_and_slug is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4467,
          "ai_signals": [
            "High anti-pattern density (0.68)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_without_permissions",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 373,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3747,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_create_get_without_permissions",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 395,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4025,
          "ai_signals": [
            "High anti-pattern density (0.56)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_m2m_field",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 418,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 432,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4673,
          "ai_signals": [
            "High anti-pattern density (0.74)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_incorrect_site_hostname",
          "type": "function_definition",
          "line_start": 437,
          "line_end": 497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 450,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 464,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 469,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 494,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 495,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 437,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_with_incorrect_site_hostname is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5523,
          "ai_signals": [
            "High anti-pattern density (0.98)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_valid_then_invalid_data",
          "type": "function_definition",
          "line_start": 499,
          "line_end": 536,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 508,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 519,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 533,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 499,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_with_valid_then_invalid_data is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_deferred_required_fields",
          "type": "function_definition",
          "line_start": 538,
          "line_end": 577,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 562,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 576,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 538,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_with_deferred_required_fields is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4705,
          "ai_signals": [
            "High anti-pattern density (0.75)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_without_title_and_slug",
          "type": "function_definition",
          "line_start": 579,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 601,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 615,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 579,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_without_title_and_slug is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4844,
          "ai_signals": [
            "High anti-pattern density (0.79)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_expiry",
          "type": "function_definition",
          "line_start": 618,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_without_permissions",
          "type": "function_definition",
          "line_start": 648,
          "line_end": 667,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 653,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.383,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_get_without_permissions",
          "type": "function_definition",
          "line_start": 669,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 674,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4139,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_big_preview_with_signed_cookies",
          "type": "decorated_definition",
          "line_start": 687,
          "line_end": 737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 713,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 733,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 687,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_big_preview_with_signed_cookies is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4139,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(SESSION_ENGINE=\"django.contrib.sessions.backends.signed_cookies\")"
          ]
        },
        {
          "name": "test_preview_on_create_clear_preview_data",
          "type": "function_definition",
          "line_start": 739,
          "line_end": 779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 743,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 743,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 757,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 768,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 779,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 739,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_create_clear_preview_data is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_on_edit_clear_preview_data",
          "type": "function_definition",
          "line_start": 781,
          "line_end": 818,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 796,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 807,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 818,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 781,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_clear_preview_data is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_modes",
          "type": "function_definition",
          "line_start": 820,
          "line_end": 843,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 829,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 839,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 843,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_preview_sizes",
          "type": "function_definition",
          "line_start": 845,
          "line_end": 863,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 852,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 857,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 858,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 861,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 862,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 867,
          "line_end": 877,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get_url_on_add",
          "type": "function_definition",
          "line_start": 879,
          "line_end": 884,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 879,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "get_url_on_edit",
          "type": "function_definition",
          "line_start": 886,
          "line_end": 887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_show_preview_panel_on_create_with_single_mode",
          "type": "function_definition",
          "line_start": 889,
          "line_end": 923,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 890,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 891,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 898,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.508,
          "ai_signals": [
            "High anti-pattern density (0.86)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_show_preview_panel_on_create_with_multiple_modes",
          "type": "function_definition",
          "line_start": 925,
          "line_end": 963,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 926,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 927,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 938,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 925,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_create_with_multiple_modes is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.558,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_show_preview_panel_on_edit_with_single_mode",
          "type": "function_definition",
          "line_start": 965,
          "line_end": 1011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 974,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 965,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_edit_with_single_mode is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.357,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_show_preview_panel_on_edit_with_multiple_modes",
          "type": "function_definition",
          "line_start": 1013,
          "line_end": 1051,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1026,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1013,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_edit_with_multiple_modes is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (0.51)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_custom_auto_update_interval",
          "type": "decorated_definition",
          "line_start": 1053,
          "line_end": 1078,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1061,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3427,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTO_UPDATE_PREVIEW_INTERVAL=12345)"
          ]
        },
        {
          "name": "test_disable_auto_update_using_zero_interval",
          "type": "decorated_definition",
          "line_start": 1080,
          "line_end": 1105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1088,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3427,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTO_UPDATE_PREVIEW_INTERVAL=0)"
          ]
        },
        {
          "name": "test_show_preview_on_revisions_list",
          "type": "function_definition",
          "line_start": 1107,
          "line_end": 1120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1116,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.458,
          "ai_signals": [
            "High anti-pattern density (0.71)",
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1128,
          "line_end": 1133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_disable_preview_on_create",
          "type": "function_definition",
          "line_start": 1135,
          "line_end": 1152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_disable_preview_on_edit",
          "type": "function_definition",
          "line_start": 1154,
          "line_end": 1170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.208,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        },
        {
          "name": "test_disable_preview_on_revisions_list",
          "type": "function_definition",
          "line_start": 1172,
          "line_end": 1191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1188,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.383,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.52)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 38,
        "avg_function_length": 29.16,
        "function_length_stddev": 13.86,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 106,
        "code_lines": 1086,
        "comment_ratio": 0.0889,
        "comment_what_ratio": 0.5155,
        "naming_avg_length": 7.64,
        "debug_artifacts": [],
        "ai_smell_count": 82,
        "ai_smell_density": 0.075506,
        "structural_uniformity": 0.5247,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.07,
        "mechanical": 75.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_audit_log.py",
      "language": "python",
      "line_count": 653,
      "token_estimate": 6229,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 51,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 53,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3949,
          "ai_signals": [
            "High anti-pattern density (0.88)"
          ]
        },
        {
          "name": "_update_page",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 92,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 93,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 98,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 106,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 111,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 114,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4361,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_history",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 116,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_history is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1715,
          "ai_signals": []
        },
        {
          "name": "test_history_group_by_uuid_and_action",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 130,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 160,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 165,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 181,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 196,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 257,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 260,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 158,
              "description": "Function is 130 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 130 lines (> 60 dynamic threshold)",
                "impact": "Function test_history_group_by_uuid_and_action is 130 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2746,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_page_history_filters",
          "type": "function_definition",
          "line_start": 289,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 309,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2207,
          "ai_signals": []
        },
        {
          "name": "test_is_commenting_action_filters",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 316,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_is_commenting_action_filters is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1392,
          "ai_signals": []
        },
        {
          "name": "test_site_history",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 407,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.1807,
          "ai_signals": []
        },
        {
          "name": "test_history_with_deleted_user",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_page_history_after_revision_purge",
          "type": "function_definition",
          "line_start": 441,
          "line_end": 459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_edit_form_has_history_link",
          "type": "function_definition",
          "line_start": 461,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_create_and_publish_logs_revision_save",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_revert_and_publish_logs_reversion_and_publish",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 530,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_page_history_after_unscheduled_publication",
          "type": "function_definition",
          "line_start": 532,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0861,
          "ai_signals": []
        },
        {
          "name": "test_page_history_after_unscheduled_revision",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 601,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 564,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_history_after_unscheduled_revision is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1782,
          "ai_signals": []
        },
        {
          "name": "test_num_queries",
          "type": "function_definition",
          "line_start": 603,
          "line_end": 652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 603,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_num_queries is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1561,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 16,
        "avg_function_length": 38.44,
        "function_length_stddev": 27.75,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 59,
        "code_lines": 594,
        "comment_ratio": 0.0904,
        "comment_what_ratio": 0.1525,
        "naming_avg_length": 7.16,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.040404,
        "structural_uniformity": 0.2781,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.62,
        "mechanical": 78.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_dashboard.py",
      "language": "python",
      "line_count": 430,
      "token_estimate": 4095,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "change_something",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "go_to_dashboard_response",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "test_your_recent_edits",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 67,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 86,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 94,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_missing_page_record",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "test_panel",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 117,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 117,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4211,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_copying_does_not_count_as_an_edit",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 167,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_input_schema",
              "severity": "medium",
              "line": 167,
              "description": "Model serving without input schema \u2014 invalid requests not caught",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 171,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_panel_query_count",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 221,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.406,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_panel_query_count",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 256,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 261,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 261,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 272,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 282,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 287,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 249,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_panel_query_count",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 329,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 330,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 358,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 358,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 362,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 372,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 377,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 321,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_panel_query_count",
          "type": "function_definition",
          "line_start": 385,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 410,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0878,
          "ai_signals": []
        },
        {
          "name": "test_common_admin_base_template",
          "type": "function_definition",
          "line_start": 412,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 415,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 416,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4378,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_meta_color_scheme",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 425,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3794,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 18,
        "avg_function_length": 20.67,
        "function_length_stddev": 15.04,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 43,
        "code_lines": 387,
        "comment_ratio": 0.1,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.14,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.072351,
        "structural_uniformity": 0.2722,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.52,
        "mechanical": 75.52,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_icon_sprite.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 384,
      "functions": [
        {
          "name": "test_content_type",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 11,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_comments",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_register_icons_hook",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 34,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1944,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_hash",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 7.25,
        "function_length_stddev": 7.37,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.12,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.04878,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.06,
        "mechanical": 87.06,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_password_reset.py",
      "language": "python",
      "line_count": 104,
      "token_estimate": 992,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": []
        },
        {
          "name": "test_login_has_password_reset_option",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": []
        },
        {
          "name": "test_login_has_no_password_reset_option_when_disabled",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_PASSWORD_RESET_ENABLED=False)"
          ]
        },
        {
          "name": "test_password_reset_view_disabled",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_PASSWORD_RESET_ENABLED=False)"
          ]
        },
        {
          "name": "test_email_found_default_url",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 56,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 56,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5231,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ROOT_URLCONF=\"wagtail.admin.urls\")"
          ]
        },
        {
          "name": "test_email_found_base_url",
          "type": "decorated_definition",
          "line_start": 58,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ROOT_URLCONF=\"wagtail.admin.urls\", WAGTAILADMIN_BASE_URL=\"http://mysite.com\"\n    )"
          ]
        },
        {
          "name": "test_email_without_base_url",
          "type": "decorated_definition",
          "line_start": 69,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "override_settings(ROOT_URLCONF=\"wagtail.admin.urls\", WAGTAILADMIN_BASE_URL=None)"
          ]
        },
        {
          "name": "test_password_reset_email_contains_username",
          "type": "decorated_definition",
          "line_start": 77,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"customuser.CustomUser\",\n        \"only applicable to CustomUser\",\n    )"
          ]
        },
        {
          "name": "test_password_reset_no_username_when_email_is_username",
          "type": "decorated_definition",
          "line_start": 90,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1731,
          "ai_signals": [],
          "decorators": [
            "unittest.skipUnless(\n        settings.AUTH_USER_MODEL == \"emailuser.EmailUser\",\n        \"only applicable to EmailUser\",\n    )"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 7.9,
        "function_length_stddev": 3.7,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 94,
        "comment_ratio": 0.0962,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.021277,
        "structural_uniformity": 0.5322,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.68,
        "mechanical": 94.68,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_userbar.py",
      "language": "python",
      "line_count": 990,
      "token_estimate": 9452,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "dummy_request",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_tag",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 83,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 84,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 49,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_userbar_tag is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.334,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ]
        },
        {
          "name": "test_userbar_does_not_break_without_request",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_tag_self",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_tag_anonymous_user",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_tag_no_page",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_edit_and_explore_links",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_edit_and_explore_menu_in_previews",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_edit_menu_not_in_preview",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_hidden_in_preview_panel",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "get_content",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "get_script",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "get_config",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "get_hook",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_position",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_config_json",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_messages",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_custom_message",
          "type": "function_definition",
          "line_start": 307,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 307,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_message is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1498,
          "ai_signals": []
        },
        {
          "name": "test_unset_run_only",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_custom_context",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_custom_run_only_and_rules_per_request",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 434,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 395,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_run_only_and_rules_per_request is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1923,
          "ai_signals": []
        },
        {
          "name": "test_custom_rules_and_checks",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 448,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_rules_and_checks is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1077,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_userbar_rendered",
          "type": "function_definition",
          "line_start": 530,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 532,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 532,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 532,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 532,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 533,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 536,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_userbar_anonymous_user_cannot_see",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 541,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 541,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 541,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 541,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 542,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 546,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_wagtail_userbar_hook_passes_page",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 559,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 559,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 559,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 559,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 560,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deprecated_construct_wagtail_userbar_hook_without_page",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 585,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 582,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 582,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 582,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 582,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 583,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_userbar_rendered_in_admin_permitted_language_if_user_has_no_language",
          "type": "decorated_definition",
          "line_start": 587,
          "line_end": 602,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 599,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 599,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 599,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 599,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 600,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_I18N_ENABLED=True,\n        WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")],\n        WAGTAILADMIN_PERMITTED_LANGUAGES=[(\"en\", \"English\")],\n        LANGUAGE_CODE=\"en\",\n    )"
          ]
        },
        {
          "name": "test_userbar_rendered_in_active_language_if_admin_permitted",
          "type": "decorated_definition",
          "line_start": 604,
          "line_end": 620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 615,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 615,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 615,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 615,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 616,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_I18N_ENABLED=True,\n        WAGTAIL_CONTENT_LANGUAGES=[(\"en\", \"English\"), (\"fr\", \"French\")],\n        LANGUAGE_CODE=\"en\",\n    )"
          ]
        },
        {
          "name": "test_userbar_rendered_in_user_preferred_language",
          "type": "decorated_definition",
          "line_start": 622,
          "line_end": 635,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 628,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 628,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 628,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 628,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 629,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"en\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 639,
          "line_end": 641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_construct_wagtail_userbar_hook_passes_page",
          "type": "function_definition",
          "line_start": 643,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_deprecated_construct_wagtail_userbar_hook_without_page",
          "type": "function_definition",
          "line_start": 661,
          "line_end": 684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 690,
          "line_end": 701,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_page_allowing_subpages",
          "type": "function_definition",
          "line_start": 703,
          "line_end": 720,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 704,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 704,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 704,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 704,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 705,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 720,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_disallowing_subpages",
          "type": "function_definition",
          "line_start": 722,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 723,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 723,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 723,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 723,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 724,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 731,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 737,
          "line_end": 743,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_render_anonymous_user",
          "type": "function_definition",
          "line_start": 745,
          "line_end": 766,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_render_no_request",
          "type": "function_definition",
          "line_start": 768,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 773,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 773,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 817,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 818,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 768,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_render_no_request is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3879,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_render_minimal",
          "type": "function_definition",
          "line_start": 822,
          "line_end": 847,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_render_with_page",
          "type": "function_definition",
          "line_start": 849,
          "line_end": 873,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_render_without_request_and_admin_base_url_setting",
          "type": "decorated_definition",
          "line_start": 875,
          "line_end": 926,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 923,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 924,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 875,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_render_without_request_and_admin_base_url_setting is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2596,
          "ai_signals": [
            "High anti-pattern density (0.58)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_BASE_URL=None)"
          ]
        },
        {
          "name": "test_component_item",
          "type": "function_definition",
          "line_start": 928,
          "line_end": 942,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_legacy_render_item",
          "type": "function_definition",
          "line_start": 944,
          "line_end": 968,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0577,
          "ai_signals": []
        },
        {
          "name": "test_component_item_with_media",
          "type": "function_definition",
          "line_start": 970,
          "line_end": 989,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 976,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 988,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4077,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 47,
        "avg_function_length": 19.32,
        "function_length_stddev": 14.39,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 316,
        "code_lines": 674,
        "comment_ratio": 0.3192,
        "comment_what_ratio": 0.0333,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 66,
        "ai_smell_density": 0.097923,
        "structural_uniformity": 0.2552,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.78,
        "mechanical": 71.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\ui\\test_sidebar.py",
      "language": "python",
      "line_count": 264,
      "token_estimate": 2174,
      "functions": [
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2522,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_adapt_with_optional_parameters",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.193,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 71,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 90,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 71,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3122,
          "ai_signals": [
            "High anti-pattern density (0.70)"
          ]
        },
        {
          "name": "test_adapt_without_footer_text",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 133,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 145,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 115,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt_without_footer_text is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.318,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 172,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.243,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.068,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 72,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 219,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 234,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 247,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 192,
              "description": "Function is 72 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 72 lines (> 37 dynamic threshold)",
                "impact": "Function test_adapt is 72 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2625,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 32.86,
        "function_length_stddev": 21.68,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 264,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.21,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.049242,
        "structural_uniformity": 0.3401,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.83,
        "mechanical": 80.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\components.py",
      "language": "python",
      "line_count": 3,
      "token_estimate": 36,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from laces.components import Component, MediaContainer",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Component' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from laces.components import Component, MediaContainer",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 2,
              "description": "Unused import: from laces.components import Component, MediaContainer",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'MediaContainer' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from laces.components import Component, MediaContainer",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 2,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.79,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 2
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\tables\\orderable.py",
      "language": "python",
      "line_count": 74,
      "token_estimate": 694,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0852,
          "ai_signals": []
        },
        {
          "name": "ordering_column",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 27,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4352,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_add_ordering_column",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0852,
          "ai_signals": []
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 40,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0852,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0852,
          "ai_signals": []
        },
        {
          "name": "get_row_attrs",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 63,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4352,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_caption",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0852,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 7.14,
        "function_length_stddev": 4.1,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 73,
        "comment_ratio": 0.0135,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.027397,
        "structural_uniformity": 0.426,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.79,
        "mechanical": 90.79,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\urls\\workflows.py",
      "language": "python",
      "line_count": 59,
      "token_estimate": 540,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 59,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\bulk_action\\mixins.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 333,
      "functions": [
        {
          "name": "annotate_items",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 11,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4326,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0826,
          "ai_signals": []
        },
        {
          "name": "get_usage_url",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0826,
          "ai_signals": []
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0826,
          "ai_signals": []
        },
        {
          "name": "prepare_action",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0826,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 5.6,
        "function_length_stddev": 3.29,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 39,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.1,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.025641,
        "structural_uniformity": 0.4132,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.39,
        "mechanical": 91.39,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\base.py",
      "language": "python",
      "line_count": 514,
      "token_estimate": 4697,
      "functions": [
        {
          "name": "get_page_title",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_header_title",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_header_icon",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_header_buttons",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 86,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1729,
          "ai_signals": []
        },
        {
          "name": "get_header_more_buttons",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_pk",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_base_object_queryset",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "perform_operation",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "add_success_message",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 215,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 216,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 217,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3638,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 225,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 226,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3638,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_search_form",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "search_form",
          "type": "decorated_definition",
          "line_start": 239,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_query",
          "type": "decorated_definition",
          "line_start": 243,
          "line_end": 247,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 244,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 244,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3638,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_searching",
          "type": "decorated_definition",
          "line_start": 249,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "search_queryset",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 287,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 263,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 277,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 285,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 253,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function search_queryset is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3638,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filters",
          "type": "decorated_definition",
          "line_start": 289,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_filtering",
          "type": "decorated_definition",
          "line_start": 297,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "filter_queryset",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "active_filters",
          "type": "decorated_definition",
          "line_start": 315,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 327,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 332,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2471,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_valid_orderings",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 348,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3638,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_explicitly_ordered",
          "type": "decorated_definition",
          "line_start": 354,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_ordering",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 362,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "ordering",
          "type": "decorated_definition",
          "line_start": 364,
          "line_end": 366,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "order_queryset",
          "type": "function_definition",
          "line_start": 368,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "paginate_queryset",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_table_kwargs",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 423,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "get_table",
          "type": "function_definition",
          "line_start": 425,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "index_url",
          "type": "decorated_definition",
          "line_start": 432,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 436,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "index_results_url",
          "type": "decorated_definition",
          "line_start": 440,
          "line_end": 442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 444,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": []
        },
        {
          "name": "no_results_message",
          "type": "decorated_definition",
          "line_start": 448,
          "line_end": 460,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0138,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 462,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 462,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function get_context_data is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0811,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 47,
        "avg_function_length": 8.13,
        "function_length_stddev": 9.4,
        "import_count": 21,
        "export_count": 0,
        "comment_lines": 50,
        "code_lines": 464,
        "comment_ratio": 0.0973,
        "comment_what_ratio": 0.069,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.034483,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.55,
        "mechanical": 88.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\permissions.py",
      "language": "python",
      "line_count": 50,
      "token_estimate": 447,
      "functions": [
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1226,
          "ai_signals": []
        },
        {
          "name": "user_has_permission",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1226,
          "ai_signals": []
        },
        {
          "name": "user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1226,
          "ai_signals": []
        },
        {
          "name": "user_has_any_permission",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1226,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.5,
        "function_length_stddev": 2.52,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 11,
        "code_lines": 39,
        "comment_ratio": 0.22,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6128,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.0,
        "mechanical": 96.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\convert_alias.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 464,
      "functions": [
        {
          "name": "convert_alias",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 20,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 37,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 14,
              "description": "Function is 40 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 30 dynamic threshold)",
                "impact": "Function convert_alias is 40 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2625,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 40,
        "function_length_stddev": 0.0,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 54,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.75,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.055556,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 47.61,
        "mechanical": 47.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\move.py",
      "language": "python",
      "line_count": 157,
      "token_estimate": 1485,
      "functions": [
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "get_form_kwargs",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "move_confirm",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 14,
            "max_nesting_depth": 4,
            "parameter_count": 3,
            "line_count": 93,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 92,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 95,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 111,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 135,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 64,
              "description": "Function is 93 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 93 lines (> 15 dynamic threshold)",
                "impact": "Function move_confirm is 93 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2702,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 21.67,
        "function_length_stddev": 35.0,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 148,
        "comment_ratio": 0.0573,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 8.53,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.040541,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.2,
        "mechanical": 76.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\workflow.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 415,
      "functions": [
        {
          "name": "add_not_in_moderation_error",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0737,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0737,
          "ai_signals": []
        },
        {
          "name": "add_error_message",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0737,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 7,
        "function_length_stddev": 4.58,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 55,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3453,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\tags.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 236,
      "functions": [
        {
          "name": "autocomplete",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.14,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 25,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 33,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.81,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.030303,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.42,
        "mechanical": 74.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\__init__.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 136,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\switch.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 33,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.27,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\pagination.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 408,
      "functions": [
        {
          "name": "paginate_queryset",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 18,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 26,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "get_paginated_response",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1192,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 21,
        "function_length_stddev": 8.49,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 54,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.037037,
        "structural_uniformity": 0.5959,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.69,
        "mechanical": 80.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\tests\\test_renderer_classes.py",
      "language": "python",
      "line_count": 92,
      "token_estimate": 958,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1049,
          "ai_signals": []
        },
        {
          "name": "test_renderer_classes_with_rest_framework_installed",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1049,
          "ai_signals": []
        },
        {
          "name": "test_renderer_classes_without_rest_framework",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1049,
          "ai_signals": [],
          "decorators": [
            "patch(\"wagtail.api.v2.views.apps.is_installed\")"
          ]
        },
        {
          "name": "test_api_response_returns_json_by_default",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 44,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 44,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 44,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 44,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_api_response_returns_json_with_json_accept_header",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 58,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 58,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 58,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 58,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_api_response_returns_html_with_html_accept_header",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 62,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 70,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 70,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 73,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_api_response_returns_html_with_browser_accept_header",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 77,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 86,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 86,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 89,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 10.29,
        "function_length_stddev": 4.89,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 80,
        "comment_ratio": 0.1304,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 16,
        "ai_smell_density": 0.2,
        "structural_uniformity": 0.5247,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.06,
        "mechanical": 74.06,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\base.py",
      "language": "python",
      "line_count": 859,
      "token_estimate": 8744,
      "functions": [
        {
          "name": "__new__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__new__",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 92,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 98,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 99,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 108,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "set_name",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 122,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "set_meta_options",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 131,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2779,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 139,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "bind",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 150,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 153,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 155,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 158,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_evaluate_callable",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_default",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 189,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3461,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "clean_deferred",
          "type": "function_definition",
          "line_start": 209,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_template",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_preview_context",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_preview_value",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "_has_default",
          "type": "decorated_definition",
          "line_start": 375,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_previewable",
          "type": "decorated_definition",
          "line_start": 379,
          "line_end": 403,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_description",
          "type": "function_definition",
          "line_start": 405,
          "line_end": 411,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 413,
          "line_end": 417,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 419,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 430,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 432,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 435,
          "line_end": 445,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 447,
          "line_end": 452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "_check_name",
          "type": "function_definition",
          "line_start": 454,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 454,
              "description": "Function is 60 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 30 dynamic threshold)",
                "impact": "Function _check_name is 60 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0862,
          "ai_signals": []
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 515,
          "line_end": 520,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 515,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 515,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 517,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 518,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "required",
          "type": "decorated_definition",
          "line_start": 522,
          "line_end": 529,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 525,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "canonical_module_path",
          "type": "decorated_definition",
          "line_start": 531,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 554,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1679,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 574,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 576,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 576,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function __eq__ is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0979,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 629,
          "line_end": 633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 629,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 632,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 635,
          "line_end": 636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "render_as_block",
          "type": "function_definition",
          "line_start": 638,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 648,
          "line_end": 649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 648,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 649,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 649,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 651,
          "line_end": 653,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 655,
          "line_end": 659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__new__",
          "type": "function_definition",
          "line_start": 668,
          "line_end": 696,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 672,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 685,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 691,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 708,
          "line_end": 712,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "_build_block_json",
          "type": "function_definition",
          "line_start": 714,
          "line_end": 719,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 718,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 718,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_context",
          "type": "decorated_definition",
          "line_start": 721,
          "line_end": 726,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "block_json",
          "type": "decorated_definition",
          "line_start": 728,
          "line_end": 733,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 735,
          "line_end": 738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 735,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 735,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 736,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 738,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 738,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_with_errors",
          "type": "function_definition",
          "line_start": 740,
          "line_end": 758,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 760,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 765,
          "line_end": 778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 767,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 771,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3779,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 780,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 784,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "telepath_pack",
          "type": "function_definition",
          "line_start": 786,
          "line_end": 787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 793,
          "line_end": 801,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 803,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "has_changed",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 818,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_help_icon",
          "type": "decorated_definition",
          "line_start": 821,
          "line_end": 825,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "get_error_json_data",
          "type": "function_definition",
          "line_start": 828,
          "line_end": 840,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        },
        {
          "name": "get_error_list_json_data",
          "type": "function_definition",
          "line_start": 843,
          "line_end": 853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0279,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 66,
        "avg_function_length": 10.64,
        "function_length_stddev": 10.2,
        "import_count": 19,
        "export_count": 6,
        "comment_lines": 331,
        "code_lines": 528,
        "comment_ratio": 0.3853,
        "comment_what_ratio": 0.0986,
        "naming_avg_length": 6.68,
        "debug_artifacts": [],
        "ai_smell_count": 38,
        "ai_smell_density": 0.07197,
        "structural_uniformity": 0.0408,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.01,
        "mechanical": 80.01,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\static_block.py",
      "language": "python",
      "line_count": 78,
      "token_estimate": 493,
      "functions": [
        {
          "name": "get_admin_text",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 23,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3516,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 30,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3516,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0016,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0016,
          "ai_signals": []
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 60,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 62,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3516,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 72,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3516,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 7.17,
        "function_length_stddev": 7.11,
        "import_count": 7,
        "export_count": 1,
        "comment_lines": 3,
        "code_lines": 75,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.26,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.08,
        "structural_uniformity": 0.0078,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.25,
        "mechanical": 77.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\forms.py",
      "language": "python",
      "line_count": 252,
      "token_estimate": 2387,
      "functions": [
        {
          "name": "_split_by_newline_or_comma",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 25,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3944,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_singleline_field",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_multiline_field",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_date_field",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_datetime_field",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_email_field",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_url_field",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_number_field",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_dropdown_field",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_multiselect_field",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_radio_field",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_checkboxes_field",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_checkbox_field",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "create_hidden_field",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "get_create_field_function",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "get_formatted_field_choices",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "get_formatted_field_initial",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "formfields",
          "type": "decorated_definition",
          "line_start": 127,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 131,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2778,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_field_options",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3944,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0444,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 12,
            "max_nesting_depth": 5,
            "parameter_count": 0,
            "line_count": 83,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 186,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 191,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 198,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 210,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 212,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 216,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 227,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 232,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 240,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 245,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 169,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 169 in clean makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 169,
              "description": "Function is 83 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 83 lines (> 15 dynamic threshold)",
                "impact": "Function clean is 83 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3944,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 8.74,
        "function_length_stddev": 16.95,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 219,
        "comment_ratio": 0.131,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 7.69,
        "debug_artifacts": [],
        "ai_smell_count": 15,
        "ai_smell_density": 0.068493,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.31,
        "mechanical": 80.31,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\panels.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 389,
      "functions": [
        {
          "name": "on_model_bound",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0575,
          "ai_signals": []
        },
        {
          "name": "submissions",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 20,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 20,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4075,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "submission_count",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0575,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0575,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0575,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 6.4,
        "function_length_stddev": 4.56,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 46,
        "comment_ratio": 0.0213,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.76,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.043478,
        "structural_uniformity": 0.2874,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.03,
        "mechanical": 88.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\views.py",
      "language": "python",
      "line_count": 372,
      "token_estimate": 3383,
      "functions": [
        {
          "name": "get_submissions_list_view",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 40,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 40,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 91,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 104,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 111,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 113,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 120,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "handle_delete",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 193,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 237,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2833,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get_filterset_kwargs",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_validated_ordering",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 254,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 265,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 267,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 270,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 271,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 273,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_ordering",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_filename",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 283,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "to_row_dict",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 302,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 308,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.05,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 315,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 319,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 320,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 333,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 336,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 336,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 346,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 346,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 347,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 351,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 353,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 357,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 358,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 324,
              "description": "Function is 48 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 30 dynamic threshold)",
                "impact": "Function get_context_data is 48 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 24,
        "avg_function_length": 9.75,
        "function_length_stddev": 10.46,
        "import_count": 25,
        "export_count": 0,
        "comment_lines": 21,
        "code_lines": 351,
        "comment_ratio": 0.0565,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 8.43,
        "debug_artifacts": [],
        "ai_smell_count": 29,
        "ai_smell_density": 0.082621,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.97,
        "mechanical": 75.97,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\cloudfront.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 631,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 31,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2785,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "purge_batch",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 36,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 49,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 51,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4341,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langchain_no_rate_limiter",
              "severity": "high",
              "line": 55,
              "description": "LLM calls without rate limiting -- hits API rate limits under load, cascading failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 55,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4341,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_create_invalidation",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 68,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 69,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4341,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 14.25,
        "function_length_stddev": 8.26,
        "import_count": 8,
        "export_count": 1,
        "comment_lines": 1,
        "code_lines": 76,
        "comment_ratio": 0.013,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.69,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.118421,
        "structural_uniformity": 0.4203,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 65.47,
        "mechanical": 65.47,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\forms.py",
      "language": "python",
      "line_count": 130,
      "token_estimate": 1110,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 86,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 94,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 123,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 126,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 126,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 10.83,
        "function_length_stddev": 6.74,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 118,
        "comment_ratio": 0.0923,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.31,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.042373,
        "structural_uniformity": 0.3783,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.91,
        "mechanical": 81.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0004_set_unique_on_path_and_site.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 141,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\signal_handlers.py",
      "language": "python",
      "line_count": 198,
      "token_estimate": 1648,
      "functions": [
        {
          "name": "pre_process",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 28,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4338,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "post_process",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 36,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 40,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 41,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 43,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4338,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "autocreate_redirects_on_slug_change",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0838,
          "ai_signals": []
        },
        {
          "name": "autocreate_redirects_on_page_move",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 68,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 69,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 66,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function autocreate_redirects_on_page_move is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3601,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ]
        },
        {
          "name": "_page_urls_for_sites",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 110,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 125,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 130,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 106,
              "description": "Function is 32 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 32 lines (> 30 dynamic threshold)",
                "impact": "Function _page_urls_for_sites is 32 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4338,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_redirects",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 58,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 149,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 150,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 160,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 161,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 186,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 187,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 195,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 196,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 197,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 140,
              "description": "Function is 58 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 58 lines (> 30 dynamic threshold)",
                "impact": "Function create_redirects is 58 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4338,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 27.5,
        "function_length_stddev": 19.03,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 168,
        "comment_ratio": 0.1515,
        "comment_what_ratio": 0.1111,
        "naming_avg_length": 7.88,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.130952,
        "structural_uniformity": 0.3078,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 59.0,
        "mechanical": 59.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_redirects_api.py",
      "language": "python",
      "line_count": 106,
      "token_estimate": 813,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2197,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_redirects_listing",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 55,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 57,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5697,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_redirect",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 80,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 92,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4455,
          "ai_signals": [
            "High anti-pattern density (0.65)",
            "Comments explain 'what' not 'why' (0.60)"
          ]
        },
        {
          "name": "test_html_path_without_redirect",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2197,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.60)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 23.5,
        "function_length_stddev": 11.79,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 99,
        "comment_ratio": 0.066,
        "comment_what_ratio": 0.6,
        "naming_avg_length": 6.57,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.040404,
        "structural_uniformity": 0.4983,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.85,
        "mechanical": 85.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\apps.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 82,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.04,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0004_copy_queries.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 193,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 12,
        "comment_ratio": 0.4,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\templates\\wagtailsearchpromotions\\includes\\searchpromotions_formset.js",
      "language": "javascript",
      "line_count": 10,
      "token_estimate": 52,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 9,
        "comment_ratio": 0.1,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\wagtail_hooks.py",
      "language": "python",
      "line_count": 75,
      "token_estimate": 565,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 17,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1373,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1373,
          "ai_signals": []
        },
        {
          "name": "register_search_picks_menu_item",
          "type": "decorated_definition",
          "line_start": 33,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1373,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        },
        {
          "name": "register_query_search_report_menu_item",
          "type": "decorated_definition",
          "line_start": 44,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1373,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_reports_menu_item\")"
          ]
        },
        {
          "name": "register_permissions",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 58,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4873,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        },
        {
          "name": "construct_edit_url",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1373,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 6.83,
        "function_length_stddev": 3.06,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 75,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.61,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.013333,
        "structural_uniformity": 0.5521,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.67,
        "mechanical": 96.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\urls.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 126,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.92,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\simple_translation\\models.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 391,
      "functions": [
        {
          "name": "after_create_page",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4059,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "hooks.register(\"after_create_page\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 17,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 24,
        "comment_ratio": 0.4286,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 6.75,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.041667,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.48,
        "mechanical": 87.48,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\sitemaps\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 13,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .sitemap_generator import Sitemap",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'Sitemap' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .sitemap_generator import Sitemap",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\__init__.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 300,
      "functions": [
        {
          "name": "get_document_model_string",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0638,
          "ai_signals": []
        },
        {
          "name": "get_document_model",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 14,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 14,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 24,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 24,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 25,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 27,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 29,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4138,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13.5,
        "function_length_stddev": 9.19,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 24,
        "comment_ratio": 0.2941,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.08,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.291667,
        "structural_uniformity": 0.3191,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.45,
        "mechanical": 72.45,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\api\\v2\\views.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 200,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.93,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0003_add_verbose_names.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 231,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 34,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.29,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0010_document_file_hash.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 107,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\rich_text\\__init__.py",
      "language": "python",
      "line_count": 31,
      "token_estimate": 213,
      "functions": [
        {
          "name": "get_model",
          "type": "decorated_definition",
          "line_start": 12,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 13,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 13,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 14,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 14,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4793,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "expand_db_attributes_many",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1293,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "extract_references",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 30,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 30,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4793,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 4,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 29,
        "comment_ratio": 0.0645,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.22,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.206897,
        "structural_uniformity": 0.6464,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_models.py",
      "language": "python",
      "line_count": 313,
      "token_estimate": 3156,
      "functions": [
        {
          "name": "test_search_method",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 30,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 30,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_operators",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 37,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 37,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 40,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 40,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_ordering",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 48,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vertex_search_no_boost",
              "severity": "low",
              "line": 52,
              "description": "Vertex AI Search without boost spec \u2014 can't tune relevance",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 70,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 84,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3369,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "test_administrator_can_edit",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_editor_can_edit",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_owner_can_edit",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_user_cant_edit",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_filename",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_file_extension",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_content_type",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_file_hash",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_content_disposition",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_document_file_deleted_oncommit",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 192,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 192,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_create_doc_invalid_extension",
          "type": "function_definition",
          "line_start": 213,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_create_doc_valid_extension",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 240,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3803,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 245,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_document_model",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 267,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 267,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 268,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 268,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 270,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_get_document_model",
          "type": "decorated_definition",
          "line_start": 275,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 276,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 276,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 278,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 278,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "test_get_document_model_at_import_time",
          "type": "function_definition",
          "line_start": 280,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": []
        },
        {
          "name": "test_custom_get_document_model_string",
          "type": "decorated_definition",
          "line_start": 283,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.CustomDocument\")"
          ]
        },
        {
          "name": "test_standard_get_document_model",
          "type": "decorated_definition",
          "line_start": 288,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 289,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 289,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 294,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 294,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings()"
          ]
        },
        {
          "name": "test_standard_get_document_model_string",
          "type": "decorated_definition",
          "line_start": 296,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1111,
          "ai_signals": [],
          "decorators": [
            "override_settings()"
          ]
        },
        {
          "name": "test_unknown_get_document_model",
          "type": "decorated_definition",
          "line_start": 302,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 303,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 303,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 306,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 306,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"tests.UnknownModel\")"
          ]
        },
        {
          "name": "test_invalid_get_document_model",
          "type": "decorated_definition",
          "line_start": 308,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 309,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 309,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 312,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 312,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4611,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAILDOCS_DOCUMENT_MODEL=\"invalid-string\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 29,
        "avg_function_length": 7.93,
        "function_length_stddev": 6.36,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 50,
        "code_lines": 263,
        "comment_ratio": 0.1597,
        "comment_what_ratio": 0.3571,
        "naming_avg_length": 8.27,
        "debug_artifacts": [],
        "ai_smell_count": 34,
        "ai_smell_density": 0.129278,
        "structural_uniformity": 0.1983,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.69,
        "mechanical": 74.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\multiple.py",
      "language": "python",
      "line_count": 143,
      "token_estimate": 1197,
      "functions": [
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 46,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 48,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 51,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 51,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 52,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 52,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_upload_form_class",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 93,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 93,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 94,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 94,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 105,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 105,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 106,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 106,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 117,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 117,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 118,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 118,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_edit_form_class",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "save_object",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0574,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 141,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 141,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 142,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 142,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4074,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 4.62,
        "function_length_stddev": 4.44,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 139,
        "comment_ratio": 0.028,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 9.92,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.158273,
        "structural_uniformity": 0.037,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\exceptions.py",
      "language": "python",
      "line_count": 11,
      "token_estimate": 41,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 11,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 17.67,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\forms.py",
      "language": "python",
      "line_count": 10,
      "token_estimate": 70,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 10,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0008_allow_long_urls.py",
      "language": "python",
      "line_count": 49,
      "token_estimate": 384,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 43,
        "comment_ratio": 0.1224,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\signal_handlers.py",
      "language": "python",
      "line_count": 14,
      "token_estimate": 88,
      "functions": [
        {
          "name": "clear_embed_caches",
          "type": "decorated_definition",
          "line_start": 7,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "receiver(setting_changed)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 7,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 11,
        "comment_ratio": 0.2143,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\admin.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 110,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 13,
        "comment_ratio": 0.1875,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.16,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\api\\v2\\serializers.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 125,
      "functions": [
        {
          "name": "get_attribute",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "to_representation",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 2,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 17,
        "comment_ratio": 0.2609,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\fields.py",
      "language": "python",
      "line_count": 193,
      "token_estimate": 1884,
      "functions": [
        {
          "name": "ImageFileExtensionValidator",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1161,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 29,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function __init__ is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1847,
          "ai_signals": []
        },
        {
          "name": "check_image_file_format",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1161,
          "ai_signals": []
        },
        {
          "name": "check_image_file_size",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1161,
          "ai_signals": []
        },
        {
          "name": "check_image_pixel_size",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1161,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 161,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 163,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 163,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 136,
              "description": "Function is 43 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 30 dynamic threshold)",
                "impact": "Function to_python is 43 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4416,
          "ai_signals": [
            "High anti-pattern density (0.93)"
          ]
        },
        {
          "name": "widget_attrs",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 186,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 189,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4661,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 7,
        "avg_function_length": 23.86,
        "function_length_stddev": 16.44,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 31,
        "code_lines": 162,
        "comment_ratio": 0.1606,
        "comment_what_ratio": 0.2692,
        "naming_avg_length": 8.07,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.04321,
        "structural_uniformity": 0.3111,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.04,
        "mechanical": 77.04,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1255,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 150,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0008_image_created_at_index.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 105,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0016_deprecate_rendition_filter_relation.py",
      "language": "python",
      "line_count": 55,
      "token_estimate": 674,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 28,
        "comment_ratio": 0.4909,
        "comment_what_ratio": 0.037,
        "naming_avg_length": 6.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0024_index_image_file_hash.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 117,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 20,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.85,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\rich_text\\__init__.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 313,
      "functions": [
        {
          "name": "get_model",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 12,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 12,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 13,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 13,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "expand_db_attributes_many",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 28,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1842,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "extract_references",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 42,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 42,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 7.25,
        "function_length_stddev": 7.85,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 37,
        "comment_ratio": 0.1395,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.4,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.189189,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\static_src\\wagtailimages\\js\\vendor\\jquery.fileupload-image.js",
      "language": "javascript",
      "line_count": 314,
      "token_estimate": 2947,
      "functions": [
        {
          "name": "resolve",
          "type": "function_expression",
          "line_start": 186,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.014,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 9,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 55,
        "code_lines": 259,
        "comment_ratio": 0.1752,
        "comment_what_ratio": 0.0698,
        "naming_avg_length": 6.26,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.5,
        "mechanical": 84.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_api_fields.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 242,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0939,
          "ai_signals": []
        },
        {
          "name": "test_api_representation",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0939,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 8,
        "function_length_stddev": 4.24,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 26,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4697,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_jinja2.py",
      "language": "python",
      "line_count": 463,
      "token_estimate": 4193,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_image",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 49,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_image",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_image_attributes",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 64,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_assignment",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 74,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_assignment_render_as_is",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 83,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_missing_image",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 93,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_custom_default_attrs",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 112,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3863,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_chaining_filterspecs",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 121,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_image_url",
          "type": "function_definition",
          "line_start": 128,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_image_url_custom_view",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 139,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 139,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_srcset_image",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 162,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 163,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_image",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_srcset_output_single_image",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_srcset_image_assignment",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 194,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 195,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_srcset_image_assignment_render_as_is",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_missing_srcset_image",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 221,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 222,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_custom_default_attrs",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 252,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 253,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.399,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_chaining_filterspecs",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 275,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 276,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_picture_formats_multi_sizes",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 299,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 300,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 306,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 307,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_picture_formats_only",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 323,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 327,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 328,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_picture_sizes_only",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_picture_single_format",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_no_image",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_picture_assignment",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 370,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 371,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 372,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 373,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_picture_assignment_render_as_is",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 386,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_missing_picture",
          "type": "function_definition",
          "line_start": 388,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 395,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 399,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 400,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 413,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0947,
          "ai_signals": []
        },
        {
          "name": "test_custom_default_attrs",
          "type": "function_definition",
          "line_start": 415,
          "line_end": 438,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 427,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 431,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 432,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chaining_filterspecs",
          "type": "function_definition",
          "line_start": 440,
          "line_end": 462,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 453,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 457,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 458,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4447,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 33,
        "avg_function_length": 12.21,
        "function_length_stddev": 6.43,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 218,
        "code_lines": 245,
        "comment_ratio": 0.4708,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.04,
        "debug_artifacts": [],
        "ai_smell_count": 39,
        "ai_smell_density": 0.159184,
        "structural_uniformity": 0.4734,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.55,
        "mechanical": 73.55,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_templatetags.py",
      "language": "python",
      "line_count": 539,
      "token_estimate": 4844,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_render_valid_image_to_string",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_render_none_to_string",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_render_valid_image_as_context_variable",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_render_none_as_context_variable",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_filters_preserve_svg",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 80,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 80,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 82,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 82,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 109,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 114,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 114,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 80,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_filters_preserve_svg is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 124,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_image",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 165,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_none",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_missing_image",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 178,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_not_an_image",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_multiple_as_variable",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_missing_as_variable",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_mixing_as_variable_and_attrs",
          "type": "function_definition",
          "line_start": 217,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_missing_filter_spec",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_srcset_image",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 251,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 252,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_srcset_output_single_image",
          "type": "function_definition",
          "line_start": 257,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_none",
          "type": "function_definition",
          "line_start": 269,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_srcset_image_assignment",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 290,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 291,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_srcset_image_assignment_render_as_is",
          "type": "function_definition",
          "line_start": 295,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 308,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 309,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_missing_srcset_image",
          "type": "function_definition",
          "line_start": 314,
          "line_end": 329,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 325,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 326,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_formats_multi_sizes",
          "type": "function_definition",
          "line_start": 333,
          "line_end": 361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 349,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 350,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 356,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 357,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_formats_only",
          "type": "function_definition",
          "line_start": 363,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 373,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 377,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 378,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_sizes_only",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_single_format",
          "type": "function_definition",
          "line_start": 395,
          "line_end": 404,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_none",
          "type": "function_definition",
          "line_start": 406,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_assignment",
          "type": "function_definition",
          "line_start": 410,
          "line_end": 425,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 420,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 421,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 422,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 423,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_assignment_render_as_is",
          "type": "function_definition",
          "line_start": 427,
          "line_end": 436,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_missing_picture",
          "type": "function_definition",
          "line_start": 438,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 449,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 450,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_invalid_character",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2804,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_chaining_filterspecs",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 478,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 482,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 483,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_preserve_svg_with_raster_image",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 489,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 489,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 498,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 498,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 503,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 509,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 510,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_preserve_svg_with_svg_image",
          "type": "function_definition",
          "line_start": 516,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 516,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 516,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 523,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 523,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 533,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 534,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6304,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 37,
        "avg_function_length": 12.78,
        "function_length_stddev": 7.64,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 226,
        "code_lines": 313,
        "comment_ratio": 0.4193,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 7.14,
        "debug_artifacts": [],
        "ai_smell_count": 47,
        "ai_smell_density": 0.15016,
        "structural_uniformity": 0.4022,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.14,
        "mechanical": 73.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\bulk_actions\\__init__.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 54,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 3,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 15.4,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\serve.py",
      "language": "python",
      "line_count": 100,
      "token_estimate": 855,
      "functions": [
        {
          "name": "generate_image_url",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 16,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 16,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "as_view",
          "type": "decorated_definition",
          "line_start": 28,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 31,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 31,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 33,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 33,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classonlymethod"
          ]
        },
        {
          "name": "get",
          "type": "decorated_definition",
          "line_start": 38,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 50,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 54,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3818,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "method_decorator(cache_control(max_age=3600, public=True))"
          ]
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 63,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 63,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 63,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 63,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 65,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "redirect",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0901,
          "ai_signals": []
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 90,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 90,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 90,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 90,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4401,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 11,
        "function_length_stddev": 7.62,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 93,
        "comment_ratio": 0.07,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.55,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.182796,
        "structural_uniformity": 0.3077,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.2,
        "mechanical": 74.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\utils.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 115,
      "functions": [
        {
          "name": "get_locale_usage",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2333,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 15,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 16,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.21,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.0625,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.88,
        "mechanical": 71.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\create_log_entries_from_revisions.py",
      "language": "python",
      "line_count": 119,
      "token_estimate": 1255,
      "functions": [
        {
          "name": "get_comparison",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 14,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 89,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 48,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 48 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "python-broad-except",
              "severity": "medium",
              "line": 60,
              "description": "Catching bare Exception \u2014 too broad",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "ast-walk",
                "proof": "Catching bare Exception \u2014 too broad",
                "impact": "Catching bare Exception at line 60 is too broad \u2014 masks real bugs",
                "recommendation": "Catch specific exception types (ValueError, TypeError, etc.)",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": [
                  "https://peps.python.org/pep-0008/#programming-recommendations"
                ]
              }
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 48,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 48,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 60,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 60,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 104,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 89 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 89 lines (> 15 dynamic threshold)",
                "impact": "Function handle is 89 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3146,
          "ai_signals": [
            "High anti-pattern density (0.90)"
          ]
        },
        {
          "name": "log_page_action",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 36.33,
        "function_length_stddev": 45.61,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 109,
        "comment_ratio": 0.084,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.75,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.073394,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 58.92,
        "mechanical": 58.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\set_url_paths.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 126,
      "functions": [
        {
          "name": "set_subtree",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4793,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 16,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4793,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 4,
        "function_length_stddev": 1.41,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.52,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.111111,
        "structural_uniformity": 0.6464,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.5,
        "mechanical": 69.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0006_add_lock_page_permission.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 168,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 25,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0014_add_verbose_name.py",
      "language": "python",
      "line_count": 144,
      "token_estimate": 1237,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 144,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.5,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0022_add_site_name.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 132,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.12,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0029_unicode_slugfield_dj19.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 147,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.87,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0037_set_page_owner_editable.py",
      "language": "python",
      "line_count": 27,
      "token_estimate": 177,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 26,
        "comment_ratio": 0.037,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0045_assign_unlock_grouppagepermission.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 209,
      "functions": [
        {
          "name": "assign_unlock_grouppagepermission",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 10,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.45,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 10,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 27,
        "comment_ratio": 0.069,
        "comment_what_ratio": 0.5,
        "naming_avg_length": 9.83,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.111111,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.5,
        "mechanical": 69.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0053_locale_model.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 199,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 31,
        "comment_ratio": 0.0312,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0061_change_promote_tab_helpt_text_and_verbose_names.py",
      "language": "python",
      "line_count": 33,
      "token_estimate": 241,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 32,
        "comment_ratio": 0.0303,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.42,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0069_log_entry_jsonfield.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 219,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 33,
        "comment_ratio": 0.0294,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0077_alter_revision_user.py",
      "language": "python",
      "line_count": 29,
      "token_estimate": 194,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 28,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.4,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0085_add_grouppagepermission_permission.py",
      "language": "python",
      "line_count": 48,
      "token_estimate": 401,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 43,
        "comment_ratio": 0.1042,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.81,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0093_uploadedfile.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 446,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 53,
        "comment_ratio": 0.0185,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.41,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\collections.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 60,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 5,
              "description": "Unused import: from wagtail.models.media import get_root_collection_id",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'get_root_collection_id' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from wagtail.models.media import get_root_collection_id",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 3,
        "comment_ratio": 0.5,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 1
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\pages.py",
      "language": "python",
      "line_count": 2840,
      "token_estimate": 26326,
      "functions": [
        {
          "name": "reassign_root_page_locale_on_delete",
          "type": "decorated_definition",
          "line_start": 90,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 99,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2342,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "receiver(pre_validate_delete, sender=Locale)"
          ]
        },
        {
          "name": "get_page_models",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_page_content_types",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 130,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_streamfield_names",
          "type": "decorated_definition",
          "line_start": 133,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "functools.cache"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_by_natural_key",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "first_common_ancestor_of",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 166,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1534,
          "ai_signals": []
        },
        {
          "name": "annotate_parent_page",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 203,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.149,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 216,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 222,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1534,
          "ai_signals": []
        },
        {
          "name": "route_for_request",
          "type": "decorated_definition",
          "line_start": 496,
          "line_end": 521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 496,
              "description": "Function is 26 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 26 lines (> 22 dynamic threshold)",
                "impact": "Function route_for_request is 26 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.163,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "find_for_request",
          "type": "decorated_definition",
          "line_start": 523,
          "line_end": 531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "allowed_http_method_names",
          "type": "decorated_definition",
          "line_start": 533,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 540,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 548,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 548,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 553,
          "line_end": 554,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "revisions",
          "type": "decorated_definition",
          "line_start": 556,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_base_content_type",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_content_type",
          "type": "function_definition",
          "line_start": 568,
          "line_end": 569,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_streamfield_names",
          "type": "decorated_definition",
          "line_start": 571,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "set_url_path",
          "type": "function_definition",
          "line_start": 575,
          "line_end": 588,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "_slug_is_available",
          "type": "decorated_definition",
          "line_start": 590,
          "line_end": 605,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "_get_autogenerated_slug",
          "type": "function_definition",
          "line_start": 607,
          "line_end": 617,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_default_locale",
          "type": "function_definition",
          "line_start": 619,
          "line_end": 634,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_admin_default_ordering",
          "type": "function_definition",
          "line_start": 636,
          "line_end": 641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "_set_core_field_defaults",
          "type": "function_definition",
          "line_start": 643,
          "line_end": 669,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "full_clean",
          "type": "function_definition",
          "line_start": 671,
          "line_end": 673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "_check_slug_is_unique",
          "type": "function_definition",
          "line_start": 675,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 689,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "minimal_clean",
          "type": "function_definition",
          "line_start": 691,
          "line_end": 694,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "is_site_root",
          "type": "function_definition",
          "line_start": 696,
          "line_end": 709,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "decorated_definition",
          "line_start": 711,
          "line_end": 816,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 106,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 712,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 712,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 797,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 711,
              "description": "Function is 106 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 106 lines (> 37 dynamic threshold)",
                "impact": "Function save is 106 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1604,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 818,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 822,
          "line_end": 885,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 838,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 865,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 876,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 822,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function check is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2471,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_update_descendant_url_paths",
          "type": "function_definition",
          "line_start": 887,
          "line_end": 896,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "page_type_display_name",
          "type": "decorated_definition",
          "line_start": 898,
          "line_end": 906,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "route",
          "type": "function_definition",
          "line_start": 908,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 908,
              "description": "Function is 24 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 24 lines (> 22 dynamic threshold)",
                "impact": "Function route is 24 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1742,
          "ai_signals": []
        },
        {
          "name": "get_admin_display_title",
          "type": "function_definition",
          "line_start": 933,
          "line_end": 941,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "save_revision",
          "type": "decorated_definition",
          "line_start": 943,
          "line_end": 1077,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 7,
            "line_count": 135,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 972,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1013,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 943,
              "description": "Function is 135 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 135 lines (> 37 dynamic threshold)",
                "impact": "Function save_revision is 135 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1061,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "get_latest_revision_as_object",
          "type": "function_definition",
          "line_start": 1079,
          "line_end": 1094,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "update_aliases",
          "type": "function_definition",
          "line_start": 1096,
          "line_end": 1213,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 5,
            "parameter_count": 3,
            "line_count": 118,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1164,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1166,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "deep-nesting",
              "severity": "high",
              "line": 1096,
              "description": "Nesting depth 5 > 4",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Nesting depth 5 > 4",
                "impact": "Nesting depth 5 at line 1096 in update_aliases makes control flow hard to follow",
                "recommendation": "Extract nested blocks into helper functions or use early returns to flatten",
                "confidence": 0.9,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1096,
              "description": "Function is 118 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 118 lines (> 30 dynamic threshold)",
                "impact": "Function update_aliases is 118 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.147,
          "ai_signals": []
        },
        {
          "name": "publish",
          "type": "function_definition",
          "line_start": 1217,
          "line_end": 1232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "unpublish",
          "type": "function_definition",
          "line_start": 1234,
          "line_end": 1241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 1245,
          "line_end": 1255,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_preview_context",
          "type": "function_definition",
          "line_start": 1257,
          "line_end": 1258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_template",
          "type": "function_definition",
          "line_start": 1260,
          "line_end": 1264,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 1266,
          "line_end": 1267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 1269,
          "line_end": 1276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1269,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1269,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 1269,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 1269,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "check_request_method",
          "type": "function_definition",
          "line_start": 1278,
          "line_end": 1298,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "handle_options_request",
          "type": "function_definition",
          "line_start": 1300,
          "line_end": 1310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1304,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1304,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_navigable",
          "type": "function_definition",
          "line_start": 1312,
          "line_end": 1318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "_get_site_root_paths",
          "type": "function_definition",
          "line_start": 1320,
          "line_end": 1331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1329,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.32,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "_get_relevant_site_root_paths",
          "type": "function_definition",
          "line_start": 1333,
          "line_end": 1341,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_url_parts",
          "type": "function_definition",
          "line_start": 1343,
          "line_end": 1421,
          "metrics": {
            "cyclomatic_complexity": 10,
            "max_nesting_depth": 4,
            "parameter_count": 1,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1378,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1395,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1400,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1400,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1406,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1406,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1410,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1410,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1416,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1416,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1343,
              "description": "Function is 79 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 30 dynamic threshold)",
                "impact": "Function get_url_parts is 79 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_full_url",
          "type": "function_definition",
          "line_start": 1423,
          "line_end": 1435,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 1439,
          "line_end": 1477,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1441,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1441,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1444,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1444,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1439,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function get_url is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "relative_url",
          "type": "function_definition",
          "line_start": 1481,
          "line_end": 1491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_site",
          "type": "function_definition",
          "line_start": 1493,
          "line_end": 1506,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_indexed_objects",
          "type": "decorated_definition",
          "line_start": 1508,
          "line_end": 1511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1510,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1510,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_indexed_instance",
          "type": "function_definition",
          "line_start": 1513,
          "line_end": 1521,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_default_privacy_setting",
          "type": "function_definition",
          "line_start": 1523,
          "line_end": 1525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "clean_subpage_models",
          "type": "decorated_definition",
          "line_start": 1527,
          "line_end": 1549,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1541,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1545,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3327,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "clean_parent_page_models",
          "type": "decorated_definition",
          "line_start": 1551,
          "line_end": 1574,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1566,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1570,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.32,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "allowed_parent_page_models",
          "type": "decorated_definition",
          "line_start": 1576,
          "line_end": 1586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "allowed_subpage_models",
          "type": "decorated_definition",
          "line_start": 1588,
          "line_end": 1598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "creatable_subpage_models",
          "type": "decorated_definition",
          "line_start": 1600,
          "line_end": 1610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "can_exist_under",
          "type": "decorated_definition",
          "line_start": 1612,
          "line_end": 1620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "can_create_at",
          "type": "decorated_definition",
          "line_start": 1622,
          "line_end": 1639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "can_move_to",
          "type": "function_definition",
          "line_start": 1641,
          "line_end": 1652,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_verbose_name",
          "type": "decorated_definition",
          "line_start": 1654,
          "line_end": 1661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_page_description",
          "type": "decorated_definition",
          "line_start": 1663,
          "line_end": 1677,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "approved_schedule",
          "type": "decorated_definition",
          "line_start": 1679,
          "line_end": 1688,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "has_unpublished_subtree",
          "type": "function_definition",
          "line_start": 1690,
          "line_end": 1698,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "move",
          "type": "function_definition",
          "line_start": 1700,
          "line_end": 1705,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "copy",
          "type": "function_definition",
          "line_start": 1707,
          "line_end": 1737,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 10,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "create_alias",
          "type": "function_definition",
          "line_start": 1741,
          "line_end": 1763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 8,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "copy_for_translation",
          "type": "function_definition",
          "line_start": 1767,
          "line_end": 1778,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "permissions_for_user",
          "type": "function_definition",
          "line_start": 1782,
          "line_end": 1797,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "is_previewable",
          "type": "function_definition",
          "line_start": 1799,
          "line_end": 1811,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_route_paths",
          "type": "function_definition",
          "line_start": 1813,
          "line_end": 1831,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_cached_paths",
          "type": "function_definition",
          "line_start": 1833,
          "line_end": 1837,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_cache_key_components",
          "type": "function_definition",
          "line_start": 1839,
          "line_end": 1849,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "cache_key",
          "type": "decorated_definition",
          "line_start": 1851,
          "line_end": 1865,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1862,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2617,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_sitemap_urls",
          "type": "function_definition",
          "line_start": 1867,
          "line_end": 1875,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_ancestors",
          "type": "function_definition",
          "line_start": 1877,
          "line_end": 1882,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_descendants",
          "type": "function_definition",
          "line_start": 1884,
          "line_end": 1889,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_siblings",
          "type": "function_definition",
          "line_start": 1891,
          "line_end": 1896,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_next_siblings",
          "type": "function_definition",
          "line_start": 1898,
          "line_end": 1899,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_prev_siblings",
          "type": "function_definition",
          "line_start": 1901,
          "line_end": 1904,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_view_restrictions",
          "type": "function_definition",
          "line_start": 1906,
          "line_end": 1932,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1923,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1929,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2876,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "serve_password_required_response",
          "type": "function_definition",
          "line_start": 1936,
          "line_end": 1960,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1936,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1936,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3084,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "with_content_json",
          "type": "function_definition",
          "line_start": 1962,
          "line_end": 2053,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 92,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1968,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1968,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1970,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1970,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 2019,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 2019,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2044,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 2049,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1962,
              "description": "Function is 92 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 92 lines (> 37 dynamic threshold)",
                "impact": "Function with_content_json is 92 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ]
        },
        {
          "name": "has_workflow",
          "type": "decorated_definition",
          "line_start": 2055,
          "line_end": 2067,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_workflow",
          "type": "function_definition",
          "line_start": 2069,
          "line_end": 2090,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 2088,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1875,
          "ai_signals": []
        },
        {
          "name": "natural_key",
          "type": "function_definition",
          "line_start": 2092,
          "line_end": 2094,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "create",
          "type": "function_definition",
          "line_start": 2115,
          "line_end": 2125,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2159,
          "line_end": 2166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 2170,
          "line_end": 2185,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "user_has_lock",
          "type": "function_definition",
          "line_start": 2187,
          "line_end": 2188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "page_locked",
          "type": "function_definition",
          "line_start": 2190,
          "line_end": 2192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_add_subpage",
          "type": "function_definition",
          "line_start": 2194,
          "line_end": 2208,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_edit",
          "type": "function_definition",
          "line_start": 2210,
          "line_end": 2233,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_delete",
          "type": "function_definition",
          "line_start": 2235,
          "line_end": 2278,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2235,
              "description": "Function is 44 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 30 dynamic threshold)",
                "impact": "Function can_delete is 44 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1079,
          "ai_signals": []
        },
        {
          "name": "can_unpublish",
          "type": "function_definition",
          "line_start": 2280,
          "line_end": 2288,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_publish",
          "type": "function_definition",
          "line_start": 2290,
          "line_end": 2296,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_submit_for_moderation",
          "type": "function_definition",
          "line_start": 2298,
          "line_end": 2303,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_set_view_restrictions",
          "type": "function_definition",
          "line_start": 2305,
          "line_end": 2306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_unschedule",
          "type": "function_definition",
          "line_start": 2308,
          "line_end": 2309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_lock",
          "type": "function_definition",
          "line_start": 2311,
          "line_end": 2321,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_unlock",
          "type": "function_definition",
          "line_start": 2323,
          "line_end": 2337,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_publish_subpage",
          "type": "function_definition",
          "line_start": 2339,
          "line_end": 2352,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_reorder_children",
          "type": "function_definition",
          "line_start": 2354,
          "line_end": 2362,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_move",
          "type": "function_definition",
          "line_start": 2364,
          "line_end": 2370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_copy",
          "type": "function_definition",
          "line_start": 2372,
          "line_end": 2373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "can_move_to",
          "type": "function_definition",
          "line_start": 2375,
          "line_end": 2417,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2375,
              "description": "Function is 43 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 30 dynamic threshold)",
                "impact": "Function can_move_to is 43 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1098,
          "ai_signals": []
        },
        {
          "name": "can_copy_to",
          "type": "function_definition",
          "line_start": 2419,
          "line_end": 2449,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2419,
              "description": "Function is 31 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 31 lines (> 30 dynamic threshold)",
                "impact": "Function can_copy_to is 31 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1413,
          "ai_signals": []
        },
        {
          "name": "can_view_revisions",
          "type": "function_definition",
          "line_start": 2451,
          "line_end": 2452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 2469,
          "line_end": 2494,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 2496,
          "line_end": 2519,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_pages",
          "type": "function_definition",
          "line_start": 2537,
          "line_end": 2555,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_content_type_ids",
          "type": "function_definition",
          "line_start": 2563,
          "line_end": 2569,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2567,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2567,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filter_on_content_type",
          "type": "function_definition",
          "line_start": 2571,
          "line_end": 2575,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2572,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2572,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3784,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 2579,
          "line_end": 2580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "get_instance_title",
          "type": "function_definition",
          "line_start": 2582,
          "line_end": 2583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_action",
          "type": "function_definition",
          "line_start": 2585,
          "line_end": 2587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "viewable_by_user",
          "type": "function_definition",
          "line_start": 2589,
          "line_end": 2608,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 2603,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2034,
          "ai_signals": []
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 2610,
          "line_end": 2611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2629,
          "line_end": 2635,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "object_id",
          "type": "decorated_definition",
          "line_start": 2637,
          "line_end": 2639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "message",
          "type": "decorated_definition",
          "line_start": 2641,
          "line_end": 2647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2696,
          "line_end": 2699,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 2701,
          "line_end": 2723,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 2718,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 2718,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3327,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "_log",
          "type": "function_definition",
          "line_start": 2725,
          "line_end": 2738,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_create",
          "type": "function_definition",
          "line_start": 2740,
          "line_end": 2741,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_edit",
          "type": "function_definition",
          "line_start": 2743,
          "line_end": 2744,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_resolve",
          "type": "function_definition",
          "line_start": 2746,
          "line_end": 2747,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_delete",
          "type": "function_definition",
          "line_start": 2749,
          "line_end": 2750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "has_valid_contentpath",
          "type": "function_definition",
          "line_start": 2752,
          "line_end": 2774,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2792,
          "line_end": 2793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "_log",
          "type": "function_definition",
          "line_start": 2795,
          "line_end": 2812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_create",
          "type": "function_definition",
          "line_start": 2814,
          "line_end": 2815,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_edit",
          "type": "function_definition",
          "line_start": 2817,
          "line_end": 2818,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        },
        {
          "name": "log_delete",
          "type": "function_definition",
          "line_start": 2820,
          "line_end": 2821,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0284,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 141,
        "avg_function_length": 15.17,
        "function_length_stddev": 20.43,
        "import_count": 62,
        "export_count": 0,
        "comment_lines": 635,
        "code_lines": 2205,
        "comment_ratio": 0.2236,
        "comment_what_ratio": 0.1418,
        "naming_avg_length": 7.29,
        "debug_artifacts": [],
        "ai_smell_count": 77,
        "ai_smell_density": 0.034921,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.14,
        "mechanical": 86.14,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\workflows.py",
      "language": "python",
      "line_count": 1373,
      "token_estimate": 11987,
      "functions": [
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 62,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 63,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "active",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 86,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 89,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 167,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "resume",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_cancel",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "update",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 299,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 2,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 271,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 261,
              "description": "Function is 39 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 30 dynamic threshold)",
                "impact": "Function update is 39 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2577,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "successful_task_states",
          "type": "decorated_definition",
          "line_start": 301,
          "line_end": 311,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_next_task",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "cancel",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 356,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1754,
          "ai_signals": []
        },
        {
          "name": "finish",
          "type": "decorated_definition",
          "line_start": 361,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "copy_approved_task_states_to_revision",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 380,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "revisions",
          "type": "function_definition",
          "line_start": 383,
          "line_end": 391,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "_get_applicable_task_states",
          "type": "function_definition",
          "line_start": 393,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "all_tasks_with_status",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 439,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 424,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 436,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.304,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "all_tasks_with_state",
          "type": "function_definition",
          "line_start": 441,
          "line_end": 468,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_error_on_empty",
              "severity": "medium",
              "line": 453,
              "description": "Query engine returns empty response without handling \u2014 confusing UX",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 465,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3282,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "is_active",
          "type": "decorated_definition",
          "line_start": 470,
          "line_end": 472,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_at_final_task",
          "type": "decorated_definition",
          "line_start": 474,
          "line_end": 486,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "active",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 527,
          "line_end": 528,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "tasks",
          "type": "decorated_definition",
          "line_start": 530,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "start",
          "type": "decorated_definition",
          "line_start": 539,
          "line_end": 581,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_state_mutation",
              "severity": "high",
              "line": 554,
              "description": "LangGraph state mutated in-place instead of returning new state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 539,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function start is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.241,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "deactivate",
          "type": "decorated_definition",
          "line_start": 583,
          "line_end": 598,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 594,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2969,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "all_pages",
          "type": "function_definition",
          "line_start": 600,
          "line_end": 611,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 608,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3698,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "active",
          "type": "function_definition",
          "line_start": 645,
          "line_end": 646,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 674,
          "line_end": 682,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 682,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 682,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 684,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "workflows",
          "type": "decorated_definition",
          "line_start": 687,
          "line_end": 692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "active_workflows",
          "type": "decorated_definition",
          "line_start": 694,
          "line_end": 699,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_verbose_name",
          "type": "decorated_definition",
          "line_start": 701,
          "line_end": 708,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_task_state_class",
          "type": "decorated_definition",
          "line_start": 712,
          "line_end": 714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "start",
          "type": "function_definition",
          "line_start": 716,
          "line_end": 730,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "on_action",
          "type": "decorated_definition",
          "line_start": 732,
          "line_end": 740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "user_can_access_editor",
          "type": "function_definition",
          "line_start": 742,
          "line_end": 748,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "locked_for_user",
          "type": "function_definition",
          "line_start": 750,
          "line_end": 755,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_lock",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_unlock",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 771,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_actions",
          "type": "function_definition",
          "line_start": 773,
          "line_end": 779,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_form_for_action",
          "type": "function_definition",
          "line_start": 781,
          "line_end": 782,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_template_for_action",
          "type": "function_definition",
          "line_start": 784,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_task_states_user_can_moderate",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "decorated_definition",
          "line_start": 794,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "deactivate",
          "type": "decorated_definition",
          "line_start": 801,
          "line_end": 812,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 811,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3698,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "start",
          "type": "function_definition",
          "line_start": 833,
          "line_end": 849,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "_user_in_groups",
          "type": "function_definition",
          "line_start": 851,
          "line_end": 866,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_access_editor",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "locked_for_user",
          "type": "function_definition",
          "line_start": 871,
          "line_end": 872,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_lock",
          "type": "function_definition",
          "line_start": 874,
          "line_end": 875,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "user_can_unlock",
          "type": "function_definition",
          "line_start": 877,
          "line_end": 878,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_actions",
          "type": "function_definition",
          "line_start": 880,
          "line_end": 888,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_task_states_user_can_moderate",
          "type": "function_definition",
          "line_start": 890,
          "line_end": 894,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "decorated_definition",
          "line_start": 896,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "reviewable_by",
          "type": "function_definition",
          "line_start": 911,
          "line_end": 916,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 914,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "for_instance",
          "type": "function_definition",
          "line_start": 920,
          "line_end": 937,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 930,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 933,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 1007,
          "line_end": 1015,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1015,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1015,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1022,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "approve",
          "type": "decorated_definition",
          "line_start": 1024,
          "line_end": 1043,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_state_mutation",
              "severity": "high",
              "line": 1039,
              "description": "LangGraph state mutated in-place instead of returning new state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2532,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "reject",
          "type": "decorated_definition",
          "line_start": 1045,
          "line_end": 1065,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_state_mutation",
              "severity": "high",
              "line": 1060,
              "description": "LangGraph state mutated in-place instead of returning new state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2448,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "task_type_started_at",
          "type": "decorated_definition",
          "line_start": 1067,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1078,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2841,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "cancel",
          "type": "decorated_definition",
          "line_start": 1085,
          "line_end": 1104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "langgraph_state_mutation",
              "severity": "high",
              "line": 1098,
              "description": "LangGraph state mutated in-place instead of returning new state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langgraph_state_mutation",
              "severity": "high",
              "line": 1100,
              "description": "LangGraph state mutated in-place instead of returning new state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4282,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "copy",
          "type": "function_definition",
          "line_start": 1106,
          "line_end": 1119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "get_comment",
          "type": "function_definition",
          "line_start": 1121,
          "line_end": 1128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "log_state_change_action",
          "type": "function_definition",
          "line_start": 1130,
          "line_end": 1156,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "decorated_definition",
          "line_start": 1189,
          "line_end": 1194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_check_draftstate_and_revision_mixins",
          "type": "decorated_definition",
          "line_start": 1196,
          "line_end": 1219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1216,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.224,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_default_workflow",
          "type": "decorated_definition",
          "line_start": 1221,
          "line_end": 1249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1237,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1237,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3196,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "has_workflow",
          "type": "decorated_definition",
          "line_start": 1251,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_workflow",
          "type": "function_definition",
          "line_start": 1258,
          "line_end": 1262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        },
        {
          "name": "workflow_states",
          "type": "decorated_definition",
          "line_start": 1264,
          "line_end": 1275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "workflow_in_progress",
          "type": "decorated_definition",
          "line_start": 1277,
          "line_end": 1295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1288,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2624,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "current_workflow_state",
          "type": "decorated_definition",
          "line_start": 1297,
          "line_end": 1317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 1310,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2448,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "current_workflow_task_state",
          "type": "decorated_definition",
          "line_start": 1319,
          "line_end": 1330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "current_workflow_task",
          "type": "decorated_definition",
          "line_start": 1332,
          "line_end": 1339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "status_string",
          "type": "decorated_definition",
          "line_start": 1341,
          "line_end": 1360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_lock",
          "type": "function_definition",
          "line_start": 1362,
          "line_end": 1372,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0782,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 77,
        "avg_function_length": 12.14,
        "function_length_stddev": 9.52,
        "import_count": 33,
        "export_count": 0,
        "comment_lines": 229,
        "code_lines": 1144,
        "comment_ratio": 0.1668,
        "comment_what_ratio": 0.175,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 34,
        "ai_smell_density": 0.02972,
        "structural_uniformity": 0.2159,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.77,
        "mechanical": 89.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\home\\apps.py",
      "language": "python",
      "line_count": 7,
      "token_estimate": 35,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 7,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\project_name\\settings\\base.py",
      "language": "python",
      "line_count": 182,
      "token_estimate": 1275,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 146,
        "comment_ratio": 0.1978,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\query.py",
      "language": "python",
      "line_count": 787,
      "token_estimate": 7766,
      "functions": [
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "descendant_of_q",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "descendant_of",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_descendant_of",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "child_of_q",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "child_of",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_child_of",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "ancestor_of_q",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "ancestor_of",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_ancestor_of",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "parent_of_q",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "parent_of",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_parent_of",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "sibling_of_q",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "sibling_of",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_sibling_of",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "_clone",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "specific",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "is_specific",
          "type": "decorated_definition",
          "line_start": 178,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "select_related",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 188,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function select_related is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0805,
          "ai_signals": []
        },
        {
          "name": "prefetch_related",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 254,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function prefetch_related is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0813,
          "ai_signals": []
        },
        {
          "name": "live_q",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 322,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "live",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_live",
          "type": "function_definition",
          "line_start": 330,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "in_menu_q",
          "type": "function_definition",
          "line_start": 336,
          "line_end": 337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "in_menu",
          "type": "function_definition",
          "line_start": 339,
          "line_end": 343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_in_menu",
          "type": "function_definition",
          "line_start": 345,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "page_q",
          "type": "function_definition",
          "line_start": 351,
          "line_end": 352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "page",
          "type": "function_definition",
          "line_start": 354,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_page",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "type_q",
          "type": "function_definition",
          "line_start": 366,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "type",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 378,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 376,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 376,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "not_type",
          "type": "function_definition",
          "line_start": 380,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 382,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 382,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "exact_type_q",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 388,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "exact_type",
          "type": "function_definition",
          "line_start": 390,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 392,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 392,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "not_exact_type",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 402,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 399,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 399,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "private_q",
          "type": "function_definition",
          "line_start": 404,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 408,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "public",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_public",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 426,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "private",
          "type": "function_definition",
          "line_start": 428,
          "line_end": 433,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "first_common_ancestor",
          "type": "function_definition",
          "line_start": 435,
          "line_end": 539,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 105,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 514,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 435,
              "description": "Function is 105 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 105 lines (> 30 dynamic threshold)",
                "impact": "Function first_common_ancestor is 105 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0933,
          "ai_signals": []
        },
        {
          "name": "unpublish",
          "type": "function_definition",
          "line_start": 541,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 545,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "defer_streamfields",
          "type": "function_definition",
          "line_start": 548,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "in_site",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "translation_of_q",
          "type": "function_definition",
          "line_start": 568,
          "line_end": 574,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "translation_of",
          "type": "function_definition",
          "line_start": 576,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "not_translation_of",
          "type": "function_definition",
          "line_start": 584,
          "line_end": 592,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "prefetch_workflow_states",
          "type": "function_definition",
          "line_start": 594,
          "line_end": 617,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "annotate_approved_schedule",
          "type": "function_definition",
          "line_start": 619,
          "line_end": 633,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "annotate_site_root_state",
          "type": "function_definition",
          "line_start": 635,
          "line_end": 647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "annotate_has_untranslated_locale",
          "type": "function_definition",
          "line_start": 649,
          "line_end": 658,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0267,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 662,
          "line_end": 751,
          "metrics": {
            "cyclomatic_complexity": 13,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 90,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 671,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 672,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 676,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 683,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 695,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 742,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 745,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 749,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 662,
              "description": "Function is 90 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 90 lines (> 15 dynamic threshold)",
                "impact": "Function __iter__ is 90 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3767,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_get_chunks",
          "type": "function_definition",
          "line_start": 753,
          "line_end": 769,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 762,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2325,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 773,
          "line_end": 786,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 774,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2767,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 55,
        "avg_function_length": 12.69,
        "function_length_stddev": 20.28,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 334,
        "code_lines": 453,
        "comment_ratio": 0.4244,
        "comment_what_ratio": 0.1333,
        "naming_avg_length": 7.03,
        "debug_artifacts": [],
        "ai_smell_count": 25,
        "ai_smell_density": 0.055188,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.42,
        "mechanical": 82.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\base.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 13,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.2,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\postgres\\query.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 18,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\elasticsearch8.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 272,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 20.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\management\\commands\\wagtail_update_index.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 21,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0008_remove_query_and_querydailyhits_models.py",
      "language": "python",
      "line_count": 28,
      "token_estimate": 152,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 27,
        "comment_ratio": 0.0357,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.43,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\tests\\test_elasticsearch.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 188,
      "functions": [
        {
          "name": "test_index_option_deprecation_warning",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 22,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3727,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 23,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.36,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.043478,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.13,
        "mechanical": 86.13,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\sites\\views.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 562,
      "functions": [
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0268,
          "ai_signals": []
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0268,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0268,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 4,
        "function_length_stddev": 3.46,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 77,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.41,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.134,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\bulk_actions\\snippet_bulk_action.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 325,
      "functions": [
        {
          "name": "models",
          "type": "decorated_definition",
          "line_start": 9,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1078,
          "ai_signals": [],
          "decorators": [
            "classproperty"
          ]
        },
        {
          "name": "object_context",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1078,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1078,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1078,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.25,
        "function_length_stddev": 3.77,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 30,
        "comment_ratio": 0.1892,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.396,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_bulk_actions\\test_custom_models.py",
      "language": "python",
      "line_count": 57,
      "token_estimate": 539,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "create_snippets",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "get_action_url",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 20,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3211,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_list_url",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "test_action_shown_for_custom_models",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "test_action_confirmation_accessible_for_custom_models",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "test_action_not_shown_for_other_models",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        },
        {
          "name": "test_action_confirmation_inaccessible_for_other_models",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0519,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 5.12,
        "function_length_stddev": 3.8,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 57,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.017544,
        "structural_uniformity": 0.2593,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.61,
        "mechanical": 95.61,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_delete_view.py",
      "language": "python",
      "line_count": 226,
      "token_estimate": 2045,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": []
        },
        {
          "name": "test_delete_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 26,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4017,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_delete_get",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": []
        },
        {
          "name": "test_delete_get_with_i18n_enabled",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=True)"
          ]
        },
        {
          "name": "test_delete_get_with_protected_reference",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_limited_permissions",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 91,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4017,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_delete_post",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": []
        },
        {
          "name": "test_delete_post_with_protected_reference",
          "type": "function_definition",
          "line_start": 118,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.183,
          "ai_signals": []
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 147,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3496,
          "ai_signals": []
        },
        {
          "name": "test_before_delete_snippet_hook_get",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 175,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3774,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_before_delete_snippet_hook_post",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 197,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3288,
          "ai_signals": []
        },
        {
          "name": "test_after_delete_snippet_hook",
          "type": "function_definition",
          "line_start": 202,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 222,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3288,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 16.42,
        "function_length_stddev": 6.87,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 220,
        "comment_ratio": 0.0265,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 8.26,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.027273,
        "structural_uniformity": 0.5816,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.01,
        "mechanical": 90.01,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_preview.py",
      "language": "python",
      "line_count": 881,
      "token_estimate": 9051,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "test_preview_on_create_with_no_form_data",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 54,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 65,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4833,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_preview_on_create_with_invalid_data",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 92,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 103,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4489,
          "ai_signals": [
            "High anti-pattern density (0.81)"
          ]
        },
        {
          "name": "test_preview_on_create_with_m2m_field",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 111,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 125,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4568,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_preview_on_create_with_deferred_required_fields",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 139,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 153,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 156,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 157,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5151,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_on_create_without_permissions",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 168,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4568,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_preview_on_create_get_without_permissions",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 181,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4568,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_m2m_field",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 195,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 207,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4833,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_valid_then_invalid_data",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 218,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 228,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 240,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4932,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_deferred_required_fields",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 254,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 266,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 269,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 270,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5151,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_multiple_modes",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 315,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 291,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 303,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 276,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_with_multiple_modes is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4276,
          "ai_signals": [
            "High anti-pattern density (0.75)"
          ]
        },
        {
          "name": "test_preview_on_edit_expiry",
          "type": "function_definition",
          "line_start": 317,
          "line_end": 354,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 317,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_expiry is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2572,
          "ai_signals": []
        },
        {
          "name": "test_preview_on_edit_without_permissions",
          "type": "function_definition",
          "line_start": 356,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 361,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4568,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_preview_on_edit_get_without_permissions",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 374,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4568,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_big_preview_with_signed_cookies",
          "type": "decorated_definition",
          "line_start": 382,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 394,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 412,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.371,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "override_settings(SESSION_ENGINE=\"django.contrib.sessions.backends.signed_cookies\")"
          ]
        },
        {
          "name": "test_preview_on_create_clear_preview_data",
          "type": "function_definition",
          "line_start": 417,
          "line_end": 452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 421,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 421,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 430,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 441,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 452,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5151,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_on_edit_clear_preview_data",
          "type": "function_definition",
          "line_start": 454,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 466,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 477,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 488,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4651,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_userbar_in_preview",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 535,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 496,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 496,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 498,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 504,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 505,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 532,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 533,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 490,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_userbar_in_preview is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.5151,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_revision",
          "type": "function_definition",
          "line_start": 537,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 550,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3985,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 560,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 562,
          "line_end": 564,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "test_show_preview_panel_on_create_with_single_mode",
          "type": "function_definition",
          "line_start": 566,
          "line_end": 600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 575,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2651,
          "ai_signals": []
        },
        {
          "name": "test_show_preview_panel_on_create_with_multiple_modes",
          "type": "function_definition",
          "line_start": 602,
          "line_end": 641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 615,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 602,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_create_with_multiple_modes is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3401,
          "ai_signals": []
        },
        {
          "name": "test_show_preview_panel_on_edit_with_single_mode",
          "type": "function_definition",
          "line_start": 643,
          "line_end": 679,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 654,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2597,
          "ai_signals": []
        },
        {
          "name": "test_show_preview_panel_on_edit_with_multiple_modes",
          "type": "function_definition",
          "line_start": 681,
          "line_end": 734,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 696,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 681,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_edit_with_multiple_modes is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2947,
          "ai_signals": []
        },
        {
          "name": "test_custom_auto_update_interval",
          "type": "decorated_definition",
          "line_start": 736,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 746,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2901,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_AUTO_UPDATE_PREVIEW_INTERVAL=12345)"
          ]
        },
        {
          "name": "test_disable_auto_update_using_zero_interval",
          "type": "decorated_definition",
          "line_start": 765,
          "line_end": 792,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 775,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2901,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_AUTO_UPDATE_PREVIEW_INTERVAL=0)"
          ]
        },
        {
          "name": "test_show_preview_on_revisions_list",
          "type": "function_definition",
          "line_start": 794,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 816,
          "line_end": 819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 821,
          "line_end": 822,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "test_disable_preview_on_create",
          "type": "function_definition",
          "line_start": 824,
          "line_end": 832,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "test_disable_preview_on_edit",
          "type": "function_definition",
          "line_start": 834,
          "line_end": 842,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        },
        {
          "name": "test_disable_preview_on_revisions_list",
          "type": "function_definition",
          "line_start": 844,
          "line_end": 857,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 854,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4151,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 868,
          "line_end": 880,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1651,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 34,
        "avg_function_length": 23.68,
        "function_length_stddev": 13.77,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 92,
        "code_lines": 789,
        "comment_ratio": 0.1044,
        "comment_what_ratio": 0.407,
        "naming_avg_length": 7.59,
        "debug_artifacts": [],
        "ai_smell_count": 56,
        "ai_smell_density": 0.070976,
        "structural_uniformity": 0.4186,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.75,
        "mechanical": 77.75,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_workflows.py",
      "language": "python",
      "line_count": 528,
      "token_estimate": 4857,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 39,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 39,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3556,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "model_name",
          "type": "decorated_definition",
          "line_start": 46,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_buttons_shown",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_buttons_not_shown_when_workflow_disabled",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_post_submit_for_moderation",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_buttons_shown",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_workflow_buttons_not_shown_when_workflow_disabled",
          "type": "decorated_definition",
          "line_start": 125,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_post_submit_for_moderation",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_index",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 203,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1806,
          "ai_signals": []
        },
        {
          "name": "test_get_index_with_bad_permissions",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 225,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2748,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_get_detail",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 349,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 116,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 259,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 265,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 333,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 337,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 341,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 345,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 346,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 349,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 234,
              "description": "Function is 116 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 116 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_detail is 116 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2771,
          "ai_signals": [
            "High anti-pattern density (0.78)"
          ]
        },
        {
          "name": "test_get_detail_completed",
          "type": "function_definition",
          "line_start": 351,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 111,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 383,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 389,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 351,
              "description": "Function is 111 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 111 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_detail_completed is 111 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1002,
          "ai_signals": []
        },
        {
          "name": "test_get_detail_with_bad_permissions",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 468,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_get_history_renders_comment",
          "type": "function_definition",
          "line_start": 482,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 496,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0056,
          "ai_signals": []
        },
        {
          "name": "test_get_confirm_workflow_cancellation",
          "type": "function_definition",
          "line_start": 502,
          "line_end": 514,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 506,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2748,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_get_confirm_workflow_cancellation_with_disabled_setting",
          "type": "decorated_definition",
          "line_start": 516,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 525,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2972,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=False)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 19.87,
        "function_length_stddev": 30.82,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 492,
        "comment_ratio": 0.0682,
        "comment_what_ratio": 0.0278,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 19,
        "ai_smell_density": 0.038618,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.88,
        "mechanical": 86.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\fields.py",
      "language": "python",
      "line_count": 83,
      "token_estimate": 564,
      "functions": [
        {
          "name": "__new__",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "__hash__",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "pre_save",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "from_db_value",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "get_db_prep_save",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "get_db_prep_value",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0715,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 5.09,
        "function_length_stddev": 3.27,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 80,
        "comment_ratio": 0.0361,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3577,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.05,
        "mechanical": 95.05,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\viewsets.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 88,
      "functions": [
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 13,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.86,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\dummy_external_storage.py",
      "language": "python",
      "line_count": 90,
      "token_estimate": 752,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "path",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "_open",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "_save",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "exists",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "listdir",
          "type": "function_definition",
          "line_start": 46,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "size",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "url",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "accessed_time",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "created_time",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "modified_time",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "open",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0308,
          "ai_signals": []
        },
        {
          "name": "size",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 88,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_catch_all_exception",
              "severity": "high",
              "line": 88,
              "description": "Broad except clause around guardrail code -- masks guardrail failures and allows unsafe output through",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3808,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 3.71,
        "function_length_stddev": 3.34,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 71,
        "comment_ratio": 0.2111,
        "comment_what_ratio": 0.0526,
        "naming_avg_length": 6.13,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.028169,
        "structural_uniformity": 0.1013,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.96,
        "mechanical": 91.96,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\routablepage\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 277,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 40,
        "comment_ratio": 0.0244,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\forms.py",
      "language": "python",
      "line_count": 8,
      "token_estimate": 43,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 5,
        "comment_ratio": 0.375,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0008_filterablesnippet.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 297,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 41,
        "comment_ratio": 0.0238,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.02,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\streamfield_migrations\\factories.py",
      "language": "python",
      "line_count": 72,
      "token_estimate": 567,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 72,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.6,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\fields.py",
      "language": "python",
      "line_count": 13,
      "token_estimate": 82,
      "functions": [
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 10,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 13,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.42,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.076923,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.77,
        "mechanical": 77.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0006_multipreviewmodespage.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 249,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 35,
        "comment_ratio": 0.0278,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.02,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0014_lockablemodel.py",
      "language": "python",
      "line_count": 59,
      "token_estimate": 453,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 58,
        "comment_ratio": 0.0169,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.01,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0022_variousondeletemodel.py",
      "language": "python",
      "line_count": 181,
      "token_estimate": 1745,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 180,
        "comment_ratio": 0.0055,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0030_purgerevisionsprotectedtestmodel.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 267,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 36,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.8,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0038_sociallink.py",
      "language": "python",
      "line_count": 53,
      "token_estimate": 399,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 52,
        "comment_ratio": 0.0189,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0046_alter_custom_rendition_to_unique_constraint.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 153,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 24,
        "comment_ratio": 0.04,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0054_delete_notyetregisteredgenericsetting_and_more.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 110,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.72,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\urls_multilang_non_root.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 78,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.52,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_factories\\blocks.py",
      "language": "python",
      "line_count": 243,
      "token_estimate": 1843,
      "functions": [
        {
          "name": "_generate",
          "type": "decorated_definition",
          "line_start": 35,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "local_inference_no_stop_tokens",
              "severity": "low",
              "line": 36,
              "description": "Local inference without stop sequences -- model generates past useful output, produces trailing garbage",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 36,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_streaming_tts",
              "severity": "medium",
              "line": 36,
              "description": "TTS without streaming -- blocks until entire audio is generated, high latency for long text",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_latency_optimization",
              "severity": "low",
              "line": 36,
              "description": "ElevenLabs TTS without optimize_streaming_latency -- adds unnecessary delay for real-time use",
              "fix_type": "deterministic"
            },
            {
              "id": "elevenlabs_no_pronunciation_dictionary",
              "severity": "low",
              "line": 36,
              "description": "Domain-specific text without pronunciation dictionary -- proper nouns and acronyms mispronounced",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "elevenlabs_no_model_selection",
              "severity": "medium",
              "line": 36,
              "description": "ElevenLabs TTS without explicit model -- defaults may change, breaking voice quality expectations",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_no_nsfw_filter",
              "severity": "high",
              "line": 36,
              "description": "Stability AI generation without NSFW/safety filter -- generated content may contain unsafe material",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_no_seed",
              "severity": "low",
              "line": 36,
              "description": "Stability AI generation without seed parameter -- results not reproducible for debugging or testing",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_construct_stream",
          "type": "decorated_definition",
          "line_start": 46,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 53,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.175,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 89,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 101,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 101,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "evaluate",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "deepeval_no_seed",
              "severity": "high",
              "line": 109,
              "description": "DeepEval test without seed or temperature 0 -- non-deterministic outputs make test results unreproducible",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 109,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__call__",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "deepeval_no_seed",
              "severity": "high",
              "line": 117,
              "description": "DeepEval test without seed or temperature 0 -- non-deterministic outputs make test results unreproducible",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 117,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "evaluate",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "deepeval_no_seed",
              "severity": "high",
              "line": 119,
              "description": "DeepEval test without seed or temperature 0 -- non-deterministic outputs make test results unreproducible",
              "fix_type": "deterministic"
            },
            {
              "id": "eval_no_latency_tracking",
              "severity": "medium",
              "line": 119,
              "description": "LLM evaluation without latency measurement -- cannot detect performance regressions from prompt or model changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 121,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 125,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 125,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 126,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 127,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 136,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 136,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_construct_struct_value",
          "type": "decorated_definition",
          "line_start": 148,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 155,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 159,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_construct_block",
          "type": "decorated_definition",
          "line_start": 171,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 181,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 206,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 210,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 221,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 225,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_build",
          "type": "decorated_definition",
          "line_start": 236,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "_create",
          "type": "decorated_definition",
          "line_start": 240,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 5.95,
        "function_length_stddev": 6.03,
        "import_count": 9,
        "export_count": 9,
        "comment_lines": 14,
        "code_lines": 229,
        "comment_ratio": 0.0576,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.52,
        "debug_artifacts": [],
        "ai_smell_count": 25,
        "ai_smell_density": 0.10917,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.9,
        "mechanical": 73.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\permission_policies\\test_page_permission_policies.py",
      "language": "python",
      "line_count": 524,
      "token_estimate": 4490,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 125,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 66,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 72,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 80,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 86,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 125 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 125 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 125 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1633,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "_test_get_all_permissions_for_user",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_get_cached_permissions_for_user",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 221,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_users_with_any_permission is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1108,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 262,
          "line_end": 282,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 284,
          "line_end": 317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 319,
          "line_end": 342,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 344,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 344,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0797,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 407,
          "line_end": 469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 407,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_any_permission_for is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0788,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 471,
          "line_end": 497,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 499,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0233,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 35.43,
        "function_length_stddev": 31.31,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 509,
        "comment_ratio": 0.0286,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.33,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.015717,
        "structural_uniformity": 0.1163,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.23,
        "mechanical": 88.23,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_old_list.py",
      "language": "python",
      "line_count": 265,
      "token_estimate": 2549,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 15,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1363,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_list_converted_to_new_format_in_recursion",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 62,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 68,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 82,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 45,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_converted_to_new_format_in_recursion is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3863,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_list_converted_to_new_format_in_operation",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 119,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 133,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 102,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_converted_to_new_format_in_operation is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3749,
          "ai_signals": [
            "High anti-pattern density (0.68)"
          ]
        },
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 151,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1363,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_list_converted_to_new_format_in_recursion",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 190,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 196,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 205,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 173,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_converted_to_new_format_in_recursion is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4342,
          "ai_signals": [
            "High anti-pattern density (0.85)"
          ]
        },
        {
          "name": "test_list_converted_to_new_format_in_operation",
          "type": "function_definition",
          "line_start": 221,
          "line_end": 264,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 238,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 252,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 221,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_list_converted_to_new_format_in_operation is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3749,
          "ai_signals": [
            "High anti-pattern density (0.68)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 40.17,
        "function_length_stddev": 12.8,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 36,
        "code_lines": 229,
        "comment_ratio": 0.1358,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.23,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.061135,
        "structural_uniformity": 0.6814,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.5,
        "mechanical": 69.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_form_data_utils.py",
      "language": "python",
      "line_count": 190,
      "token_estimate": 1832,
      "functions": [
        {
          "name": "test_html_only",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 152,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4545,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_include_csrf",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 156,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4545,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_index",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 172,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 171,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4545,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_id",
          "type": "function_definition",
          "line_start": 174,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 180,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4545,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_form_id",
          "type": "function_definition",
          "line_start": 183,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1045,
          "ai_signals": []
        },
        {
          "name": "test_invalid_index",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1045,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 5.83,
        "function_length_stddev": 2.79,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 61,
        "code_lines": 129,
        "comment_ratio": 0.3211,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.31,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.031008,
        "structural_uniformity": 0.5223,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.41,
        "mechanical": 89.41,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_assertions.py",
      "language": "python",
      "line_count": 174,
      "token_estimate": 1678,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_routable",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_routable_with_alternative_route",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_routable_fails_for_draft_page",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_routable_fails_for_invalid_route_path",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_renderable",
          "type": "decorated_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.get\")",
            "mock.patch(\"django.test.testcases.Client.force_login\")"
          ]
        },
        {
          "name": "test_is_renderable_for_alternative_route",
          "type": "decorated_definition",
          "line_start": 46,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.get\")",
            "mock.patch(\"django.test.testcases.Client.force_login\")"
          ]
        },
        {
          "name": "test_is_renderable_for_user",
          "type": "decorated_definition",
          "line_start": 53,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.get\")",
            "mock.patch(\"django.test.testcases.Client.force_login\")"
          ]
        },
        {
          "name": "test_is_renderable_with_query_data",
          "type": "decorated_definition",
          "line_start": 62,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.get\")"
          ]
        },
        {
          "name": "test_is_renderable_with_query_and_post_data",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.post\")"
          ]
        },
        {
          "name": "test_is_renderable_for_draft_page",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_renderable_for_invalid_route_path",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_rendereable_accept_redirect",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 105,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 110,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4067,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_is_editable",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_editable_always_authenticates",
          "type": "decorated_definition",
          "line_start": 116,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 120,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 129,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4067,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.force_login\")"
          ]
        },
        {
          "name": "test_is_editable_with_permission_lacking_user",
          "type": "decorated_definition",
          "line_start": 136,
          "line_end": 145,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"django.test.testcases.Client.get\")",
            "mock.patch(\"django.test.testcases.Client.force_login\")"
          ]
        },
        {
          "name": "test_is_editable_with_post_data",
          "type": "function_definition",
          "line_start": 147,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_previewable",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_previewable_with_post_data",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_previewable_with_custom_user",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_previewable_for_alternative_mode",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        },
        {
          "name": "test_is_previewable_for_broken_mode",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0567,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 6.13,
        "function_length_stddev": 4.39,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 168,
        "comment_ratio": 0.0345,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.68,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.02381,
        "structural_uniformity": 0.2834,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.92,
        "mechanical": 92.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_rich_text.py",
      "language": "python",
      "line_count": 452,
      "token_estimate": 4541,
      "functions": [
        {
          "name": "test_expand_db_attributes",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_page_does_not_exist",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_not_for_editor",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 51,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_autolocalizes",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_doesnt_autolocalize_unpublished_page",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_extract_attr",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 85,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_db_html_no_linktype",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 94,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_invalid_linktype_set_to_empty_link",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 99,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_valid_linktype_and_reference",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 104,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_valid_linktype_invalid_reference_set_to_empty_link",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 109,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_no_embedtype_remove_tag",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_invalid_embedtype_remove_tag",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_html_with_embed",
          "type": "decorated_definition",
          "line_start": 118,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 124,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "patch(\"wagtail.embeds.embeds.get_embed\")"
          ]
        },
        {
          "name": "test_expand_db_html_database_queries_pages",
          "type": "decorated_definition",
          "line_start": 129,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\n            \"default\": {\n                \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\n            },\n        }\n    )"
          ]
        },
        {
          "name": "test_expand_db_html_database_queries_documents",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_html_database_queries_images",
          "type": "decorated_definition",
          "line_start": 177,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 194,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 194,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 195,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 195,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        CACHES={\n            \"renditions\": {\n                \"BACKEND\": \"django.core.cache.backends.dummy.DummyCache\",\n            },\n        }\n    )"
          ]
        },
        {
          "name": "test_expand_db_html_mixed_link_types",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_construct_with_none",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_construct_with_empty_string",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_construct_with_nonempty_string",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 235,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 237,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_evaluate_value",
          "type": "function_definition",
          "line_start": 244,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_compare_value",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_register_rich_text_features_hook",
          "type": "function_definition",
          "line_start": 261,
          "line_end": 266,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 266,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3643,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_missing_editor_plugin_returns_none",
          "type": "function_definition",
          "line_start": 268,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_should_follow_default_behaviour",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 308,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_supported_type_should_follow_given_rules",
          "type": "function_definition",
          "line_start": 310,
          "line_end": 359,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 310,
              "description": "Function is 50 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 37 dynamic threshold)",
                "impact": "Function test_supported_type_should_follow_given_rules is 50 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0843,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content_whitespace",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_max_length_validation",
          "type": "function_definition",
          "line_start": 385,
          "line_end": 409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 411,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0143,
          "ai_signals": []
        },
        {
          "name": "test_count_characters",
          "type": "function_definition",
          "line_start": 423,
          "line_end": 451,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 431,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.135,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 34,
        "avg_function_length": 10.56,
        "function_length_stddev": 11.33,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 276,
        "code_lines": 176,
        "comment_ratio": 0.6106,
        "comment_what_ratio": 0.0714,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 13,
        "ai_smell_density": 0.073864,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.85,
        "mechanical": 80.85,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_views.py",
      "language": "python",
      "line_count": 101,
      "token_estimate": 999,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "test_post_incorrect_password",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "test_post_correct_password",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        },
        {
          "name": "test_serve_query_count",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 65,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 65,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 67,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 67,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 67,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 67,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3923,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_process_view_by_page_query_count",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0423,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 12.5,
        "function_length_stddev": 9.85,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 98,
        "comment_ratio": 0.0297,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.37,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.081633,
        "structural_uniformity": 0.2117,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.34,
        "mechanical": 76.34,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\apps.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 99,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.24,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0007_userprofile_current_time_zone.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 146,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0015_userprofile_keyboard_shortcuts.py",
      "language": "python",
      "line_count": 23,
      "token_estimate": 143,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 22,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.62,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\bulk_actions\\__init__.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 55,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 3,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 16.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\widgets.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 125,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 16,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\sendfile.py",
      "language": "python",
      "line_count": 107,
      "token_estimate": 776,
      "functions": [
        {
          "name": "_lazy_load",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0003,
          "ai_signals": []
        },
        {
          "name": "_get_sendfile",
          "type": "decorated_definition",
          "line_start": 27,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0003,
          "ai_signals": [],
          "decorators": [
            "_lazy_load"
          ]
        },
        {
          "name": "sendfile",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 106,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 2,
            "parameter_count": 7,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 41,
              "description": "Function is 66 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 30 dynamic threshold)",
                "impact": "Function sendfile is 66 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0534,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 30.67,
        "function_length_stddev": 30.62,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 89,
        "comment_ratio": 0.1682,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.011236,
        "structural_uniformity": 0.0017,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.16,
        "mechanical": 83.16,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\views.py",
      "language": "python",
      "line_count": 62,
      "token_estimate": 533,
      "functions": [
        {
          "name": "serve_chain",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 12,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 12,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 13,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 13,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 13,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 13,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 16,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 16,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 16,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 16,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 23,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 23,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 24,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 24,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 24,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 25,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 25,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 27,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 27,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 27,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 32,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 32,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3859,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "authenticate_with_password",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2951,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 15.33,
        "function_length_stddev": 12.58,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 58,
        "comment_ratio": 0.0645,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.38,
        "debug_artifacts": [],
        "ai_smell_count": 24,
        "ai_smell_density": 0.413793,
        "structural_uniformity": 0.1794,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 62.57,
        "mechanical": 62.57,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\actions\\move_page.py",
      "language": "python",
      "line_count": 108,
      "token_estimate": 952,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "_move_page",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 63,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 35,
              "description": "Function is 63 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 63 lines (> 37 dynamic threshold)",
                "impact": "Function _move_page is 63 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0556,
          "ai_signals": []
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 20.75,
        "function_length_stddev": 28.22,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 95,
        "comment_ratio": 0.1204,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.89,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.010526,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.89,
        "mechanical": 87.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\active_filters.py",
      "language": "python",
      "line_count": 219,
      "token_estimate": 1733,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 26,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3848,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "get_url_without_filter_param",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 43,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4264,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "get_url_without_filter_param_value",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1348,
          "ai_signals": []
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 68,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4529,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 75,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 80,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 93,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4529,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 107,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 108,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 120,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 121,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "format_value",
          "type": "function_definition",
          "line_start": 133,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_active_filters",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 143,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 144,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "format_value",
          "type": "function_definition",
          "line_start": 159,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 160,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4848,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_filter_adapter_class",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "instructor_response_model_no_field_descriptions",
              "severity": "medium",
              "line": 169,
              "description": "Pydantic response_model fields lack Field descriptions -- LLM has no guidance on what each field means, producing low-quality extractions",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2869,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 11.42,
        "function_length_stddev": 6.01,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 26,
        "code_lines": 193,
        "comment_ratio": 0.1187,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 8.76,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.072539,
        "structural_uniformity": 0.4738,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.06,
        "mechanical": 80.06,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\actions\\create_alias.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 453,
      "functions": [
        {
          "name": "_action_from_data",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2,
          "ai_signals": [
            "Suspiciously uniform function lengths (1.00)"
          ]
        },
        {
          "name": "execute",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 45,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 47,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.55,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12,
        "function_length_stddev": 0.0,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 52,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.84,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.038462,
        "structural_uniformity": 1.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.53,
        "mechanical": 85.53,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\api\\urls.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 95,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.22,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\filters.py",
      "language": "python",
      "line_count": 304,
      "token_estimate": 2705,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "decompress",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "decompress",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "choice",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 68,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "get_filter_value",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 131,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 132,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_add_locale_filter",
          "type": "function_definition",
          "line_start": 137,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 156,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 158,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 159,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filter_for_lookup",
          "type": "decorated_definition",
          "line_start": 164,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 170,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2027,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "label_from_instance",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 190,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 191,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "label_from_instance",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 206,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 207,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "label_from_instance",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 220,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "min_depth",
          "type": "decorated_definition",
          "line_start": 229,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "choice",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "filter",
          "type": "function_definition",
          "line_start": 254,
          "line_end": 259,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0082,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 5,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 279,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 281,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 289,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 293,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 293,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 297,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3582,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 19,
        "avg_function_length": 8.05,
        "function_length_stddev": 7.72,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 48,
        "code_lines": 256,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.34,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.070312,
        "structural_uniformity": 0.0412,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.24,
        "mechanical": 79.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\forms\\models.py",
      "language": "python",
      "line_count": 268,
      "token_estimate": 2430,
      "functions": [
        {
          "name": "register_form_field_override",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": []
        },
        {
          "name": "formfield_for_dbfield",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 115,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": []
        },
        {
          "name": "child_form",
          "type": "decorated_definition",
          "line_start": 126,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": []
        },
        {
          "name": "defer_required_fields",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 148,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 155,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 160,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 164,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4136,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "restore_required_fields",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 174,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 175,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 181,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 185,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4136,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_field_updates_for_resave",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 7,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 199,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 203,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 208,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 209,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 190,
              "description": "Function is 35 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 35 lines (> 30 dynamic threshold)",
                "impact": "Function get_field_updates_for_resave is 35 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4136,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "show_schedule_publishing_toggle",
          "type": "decorated_definition",
          "line_start": 235,
          "line_end": 237,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 239,
          "line_end": 267,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0636,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 15.1,
        "function_length_stddev": 12.24,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 42,
        "code_lines": 226,
        "comment_ratio": 0.1567,
        "comment_what_ratio": 0.129,
        "naming_avg_length": 8.46,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.061947,
        "structural_uniformity": 0.1892,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.58,
        "mechanical": 72.58,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\localization.py",
      "language": "python",
      "line_count": 157,
      "token_estimate": 1442,
      "functions": [
        {
          "name": "get_js_translation_strings",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 56,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function get_js_translation_strings is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1097,
          "ai_signals": []
        },
        {
          "name": "get_available_admin_languages",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0353,
          "ai_signals": []
        },
        {
          "name": "get_available_admin_time_zones",
          "type": "decorated_definition",
          "line_start": 111,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0353,
          "ai_signals": [],
          "decorators": [
            "functools.cache"
          ]
        },
        {
          "name": "get_localized_response",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 4,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 136,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 137,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 145,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 154,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 155,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3853,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 23.75,
        "function_length_stddev": 21.05,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 141,
        "comment_ratio": 0.1019,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 7.6,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.042553,
        "structural_uniformity": 0.1139,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.11,
        "mechanical": 81.11,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\migrations\\0005_editingsession_is_editing.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 100,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\base.py",
      "language": "python",
      "line_count": 340,
      "token_estimate": 3181,
      "functions": [
        {
          "name": "get_form_for_model",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 48,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 48,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3683,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 92,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 6,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "clone",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 117,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 135,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.256,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "bind_to_model",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 141,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 141,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_bound_panel",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 150,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 157,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 157,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 168,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "on_model_bound",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "classes",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 194,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 196,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean_name",
          "type": "decorated_definition",
          "line_start": 202,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "format_value_for_display",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 233,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 246,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 247,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "classname",
          "type": "decorated_definition",
          "line_start": 252,
          "line_end": 254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "classes",
          "type": "function_definition",
          "line_start": 256,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "attrs",
          "type": "decorated_definition",
          "line_start": 259,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "icon",
          "type": "decorated_definition",
          "line_start": 263,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "id_for_label",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 267,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 269,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 271,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "show_panel_furniture",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "is_required",
          "type": "function_definition",
          "line_start": 285,
          "line_end": 286,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 288,
          "line_end": 292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "get_comparison",
          "type": "function_definition",
          "line_start": 294,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "render_missing_fields",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 312,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 302,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2689,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "render_form_content",
          "type": "function_definition",
          "line_start": 314,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0501,
          "ai_signals": []
        },
        {
          "name": "js_opts",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 335,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "telepath_pack",
          "type": "function_definition",
          "line_start": 338,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 339,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4001,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 30,
        "avg_function_length": 8.77,
        "function_length_stddev": 7.12,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 109,
        "code_lines": 231,
        "comment_ratio": 0.3206,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 6.52,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.095238,
        "structural_uniformity": 0.188,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.02,
        "mechanical": 75.02,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\panels\\page_chooser_panel.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 234,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1143,
          "ai_signals": []
        },
        {
          "name": "clone_kwargs",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1143,
          "ai_signals": []
        },
        {
          "name": "get_form_options",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1143,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 7,
        "function_length_stddev": 3.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 30,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.7,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5714,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.17,
        "mechanical": 98.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\rich_text\\converters\\contentstate_models.py",
      "language": "python",
      "line_count": 94,
      "token_estimate": 576,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_dict",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_dict",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_dict",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_dict",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "add_entity",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_dict",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        },
        {
          "name": "as_json",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1297,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 5.33,
        "function_length_stddev": 1.87,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 93,
        "comment_ratio": 0.0106,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.6485,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\signal_handlers.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 357,
      "functions": [
        {
          "name": "register_signal_handlers",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1735,
          "ai_signals": [
            "Overly verbose naming (0.69)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 22,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 43,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 20.41,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.4,
        "mechanical": 96.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.datetimepicker.js",
      "language": "javascript",
      "line_count": 2912,
      "token_estimate": 26763,
      "functions": [
        {
          "name": "o",
          "type": "function_expression",
          "line_start": 10,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0194,
          "ai_signals": []
        },
        {
          "name": "datetimepickerFactory",
          "type": "function_expression",
          "line_start": 19,
          "line_end": 2676,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 2658,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 22,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 22 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 643,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 643 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 648,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 648 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 652,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 652 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 653,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 653 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 668,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 668 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 680,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 680 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 708,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 708 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 718,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 718 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 728,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 728 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 740,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 740 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 754,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 754 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 784,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 784 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 786,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 786 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 827,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 827 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 906,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 906 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 926,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 926 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 941,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 941 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 991,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 991 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1043,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1043 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1071,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1071 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1072,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1072 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1073,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1073 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1075,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1075 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1076,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1076 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1077,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1077 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1087,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1087 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1100,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1100 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1123,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1123 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1145,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1145 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1179,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1179 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1297,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1297 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1301,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1301 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1366,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1366 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1368,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1368 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1429,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1429 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1464,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1464 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1485,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1485 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1490,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1490 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1501,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1501 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1532,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1532 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1543,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1543 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1551,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1551 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1577,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1577 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1596,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1596 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1623,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1623 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1628,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1628 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1674,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1674 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1770,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1770 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1848,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1848 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1850,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1850 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1853,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1853 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1855,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1855 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1860,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1860 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1861,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1861 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1863,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1863 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1869,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1869 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1870,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1870 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1872,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1872 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1878,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1878 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1885,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1885 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1913,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1913 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 1975,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 1975 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2019,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2019 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2089,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2089 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2163,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2163 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2245,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2245 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2265,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2265 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2293,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2293 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2325,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2325 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2326,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2326 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2337,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2337 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2353,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2353 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2402,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2402 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2407,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2407 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2408,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2408 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2427,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2427 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2453,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2453 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2454,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2454 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2455,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2455 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2456,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2456 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2457,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2457 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2458,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2458 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2475,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2475 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2478,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2478 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2479,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2479 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2480,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2480 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2482,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2482 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2483,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2483 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2484,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2484 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2489,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2489 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2490,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2490 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2491,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2491 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2578,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2578 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2617,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2617 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 19,
              "description": "Function is 2658 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 2658 lines (> 37 dynamic threshold)",
                "impact": "Function datetimepickerFactory is 2658 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            },
            {
              "id": "react-conditional-rendering-anti-pattern",
              "severity": "medium",
              "line": 879,
              "description": "Complex nested ternary or && chain for conditional rendering - hard to read and error-prone",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-skip-link-missing",
              "severity": "medium",
              "line": 1298,
              "description": "Application has no skip-to-content link - keyboard users must tab through all navigation on every page",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-usestate-functional-update-missing",
              "severity": "medium",
              "line": 1834,
              "description": "setState called with a value that depends on current state without using the functional updater - race conditions with batched updates",
              "fix_type": "deterministic"
            },
            {
              "id": "react-autofocus-accessibility",
              "severity": "low",
              "line": 2565,
              "description": "Auto-focusing an element without checking prefers-reduced-motion or user preferences - jarring for some users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "react-autofocus-accessibility",
              "severity": "low",
              "line": 2622,
              "description": "Auto-focusing an element without checking prefers-reduced-motion or user preferences - jarring for some users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "firebase_no_rate_limit",
              "severity": "high",
              "line": 973,
              "description": "Firebase Cloud Functions HTTP trigger without rate limiting \u2014 vulnerable to abuse and cost spikes",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1538,
          "ai_signals": []
        },
        {
          "name": "handler",
          "type": "function_declaration",
          "line_start": 2783,
          "line_end": 2894,
          "metrics": {
            "cyclomatic_complexity": 27,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 112,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2784,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2784 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2829,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2829 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2834,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2834 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2867,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2867 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2783,
              "description": "Function is 112 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 112 lines (> 15 dynamic threshold)",
                "impact": "Function handler is 112 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1757,
          "ai_signals": []
        },
        {
          "name": "nullLowestDelta",
          "type": "function_declaration",
          "line_start": 2896,
          "line_end": 2898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0194,
          "ai_signals": []
        },
        {
          "name": "shouldAdjustOldDeltas",
          "type": "function_declaration",
          "line_start": 2900,
          "line_end": 2909,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0194,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 556.8,
        "function_length_stddev": 1175.53,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 119,
        "code_lines": 2793,
        "comment_ratio": 0.0409,
        "comment_what_ratio": 0.0972,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 107,
        "ai_smell_density": 0.03831,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 58.12,
        "mechanical": 58.12,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\staticfiles.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 688,
      "functions": [
        {
          "name": "versioned_static",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0964,
          "ai_signals": []
        },
        {
          "name": "versioned_static",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0964,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 12,
        "function_length_stddev": 7.07,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 52,
        "comment_ratio": 0.2571,
        "comment_what_ratio": 0.0714,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4107,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.4,
        "mechanical": 95.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templates\\wagtailadmin\\shared\\dropdown\\dropdown.stories.tsx",
      "language": "tsx",
      "line_count": 53,
      "token_estimate": 351,
      "functions": [
        {
          "name": "Template",
          "type": "arrow_function",
          "line_start": 40,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 1,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "nextjs-passing-non-serializable-props",
              "severity": "high",
              "line": 40,
              "description": "Passing functions, classes, Date objects, or other non-serializable values from Server Component to Client Component - will cause runtime serialization error",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 1,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 2,
        "comment_lines": 0,
        "code_lines": 53,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.91,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.018868,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.28,
        "mechanical": 95.28,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\templatetags\\wagtailuserbar.py",
      "language": "python",
      "line_count": 43,
      "token_estimate": 291,
      "functions": [
        {
          "name": "get_page_instance",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 15,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4965,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "wagtailuserbar",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 27,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 33,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5116,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 16,
        "function_length_stddev": 7.07,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 36,
        "comment_ratio": 0.1628,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 6.9,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.083333,
        "structural_uniformity": 0.5581,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.12,
        "mechanical": 69.12,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\benches.py",
      "language": "python",
      "line_count": 97,
      "token_estimate": 755,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 31,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.438,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "bench",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2921,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 62,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 69,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4671,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        },
        {
          "name": "bench",
          "type": "function_definition",
          "line_start": 83,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2921,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 17.25,
        "function_length_stddev": 5.85,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 19,
        "code_lines": 78,
        "comment_ratio": 0.1959,
        "comment_what_ratio": 0.8,
        "naming_avg_length": 6.38,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.025641,
        "structural_uniformity": 0.6607,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.66,
        "mechanical": 88.66,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_bulk_actions\\test_bulk_publish.py",
      "language": "python",
      "line_count": 382,
      "token_estimate": 3610,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 26,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 35,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 39,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 66,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 17,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_view",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 82,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3703,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_publish_view_invalid_page_id",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.137,
          "ai_signals": []
        },
        {
          "name": "test_publish_view_bad_permissions",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 115,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 126,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 132,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_view_post",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 169,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 151,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 157,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.437,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_after_publish_page",
          "type": "function_definition",
          "line_start": 171,
          "line_end": 189,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 176,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 185,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 187,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_publish_page",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 196,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 205,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_descendants_view",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 217,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3428,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 227,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 8,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 88,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 235,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 243,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 246,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_prompt_injection_concat",
              "severity": "critical",
              "line": 247,
              "description": "User input concatenated directly into prompt body -- prompt injection vulnerability",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 277,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 278,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 281,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 282,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 227,
              "description": "Function is 88 lines (> 60 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 88 lines (> 60 dynamic threshold)",
                "impact": "Function setUp is 88 lines \u2014 exceeds 60 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_descendants_view",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 326,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3428,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_publish_include_children_view_post",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 345,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 351,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 354,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 355,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_not_include_children_view_post",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 381,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 373,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 379,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 380,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.487,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 29.33,
        "function_length_stddev": 21.6,
        "import_count": 11,
        "export_count": 0,
        "comment_lines": 62,
        "code_lines": 320,
        "comment_ratio": 0.1623,
        "comment_what_ratio": 0.4211,
        "naming_avg_length": 7.6,
        "debug_artifacts": [],
        "ai_smell_count": 37,
        "ai_smell_density": 0.115625,
        "structural_uniformity": 0.2637,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 61.62,
        "mechanical": 61.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_edit_page.py",
      "language": "python",
      "line_count": 5311,
      "token_estimate": 52082,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 64,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1531,
          "ai_signals": []
        },
        {
          "name": "get_publish_button_label",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 132,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 124,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 125,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 130,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 131,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "schedule_child_page",
          "type": "function_definition",
          "line_start": 134,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "assertSchedulingDialogRendered",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 148,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2067,
          "ai_signals": []
        },
        {
          "name": "test_page_edit",
          "type": "function_definition",
          "line_start": 178,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 81,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 184,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 184,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 190,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 193,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 193,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 206,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 223,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 248,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 178,
              "description": "Function is 81 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 81 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit is 81 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_loaded_revision_id_and_timestamp_included_in_form",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 278,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 270,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.278,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_autosave_disabled",
          "type": "decorated_definition",
          "line_start": 280,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 286,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3854,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTOSAVE_INTERVAL=0)"
          ]
        },
        {
          "name": "test_autosave_custom_interval",
          "type": "decorated_definition",
          "line_start": 293,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 299,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2997,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTOSAVE_INTERVAL=2000)"
          ]
        },
        {
          "name": "test_publish_button_shows_schedule_label_for_future_go_live",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 327,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 311,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 319,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 319,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 323,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 327,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_button_shows_publish_label_for_past_schedule",
          "type": "function_definition",
          "line_start": 329,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 329,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 337,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 341,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 345,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_page_action_menu_hook_with_custom_default_button",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 394,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 349,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 355,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 359,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 359,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 371,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 387,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 347,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_construct_page_action_menu_hook_with_custom_default_button is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_construct_page_action_menu_hook_removes_all_buttons",
          "type": "function_definition",
          "line_start": 396,
          "line_end": 414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 411,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.278,
          "ai_signals": [
            "High anti-pattern density (0.53)"
          ]
        },
        {
          "name": "test_usage_count_information_shown",
          "type": "function_definition",
          "line_start": 416,
          "line_end": 429,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_edit_custom_permissions",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_workflow_buttons_not_shown_when_workflow_disabled",
          "type": "decorated_definition",
          "line_start": 443,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_WORKFLOW_ENABLED=False)"
          ]
        },
        {
          "name": "test_edit_draft_page_with_no_revisions",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_edit_multipart",
          "type": "function_definition",
          "line_start": 459,
          "line_end": 476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 469,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2882,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "test_edit_when_specific_class_cannot_be_found",
          "type": "decorated_definition",
          "line_start": 478,
          "line_end": 483,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": [],
          "decorators": [
            "mock.patch(\"wagtail.models.ContentType.model_class\", return_value=None)"
          ]
        },
        {
          "name": "test_upload_file_publish",
          "type": "function_definition",
          "line_start": 485,
          "line_end": 510,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_upload_file_draft",
          "type": "function_definition",
          "line_start": 512,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_bad_permissions",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 551,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2688,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 593,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_with_json_response",
          "type": "function_definition",
          "line_start": 595,
          "line_end": 740,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 146,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 615,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 638,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 595,
              "description": "Function is 146 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 146 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit_post_with_json_response is 146 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1657,
          "ai_signals": []
        },
        {
          "name": "test_save_outdated_revision_with_json_response",
          "type": "function_definition",
          "line_start": 742,
          "line_end": 789,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 767,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 742,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_save_outdated_revision_with_json_response is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2396,
          "ai_signals": []
        },
        {
          "name": "test_save_outdated_revision_timestamp_with_json_response",
          "type": "function_definition",
          "line_start": 791,
          "line_end": 839,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 820,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 791,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_save_outdated_revision_timestamp_with_json_response is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2366,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_with_overwrite_revision_and_json_response",
          "type": "function_definition",
          "line_start": 841,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 868,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 841,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit_post_with_overwrite_revision_and_json_response is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.231,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_non_latest_revision",
          "type": "function_definition",
          "line_start": 893,
          "line_end": 936,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 916,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 893,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_overwrite_non_latest_revision is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2529,
          "ai_signals": []
        },
        {
          "name": "test_get_hydrate_create_view",
          "type": "function_definition",
          "line_start": 938,
          "line_end": 1072,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 135,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 944,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 945,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 938,
              "description": "Function is 135 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 135 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_hydrate_create_view is 135 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1716,
          "ai_signals": []
        },
        {
          "name": "test_save_with_json_response_does_not_affect_sessions",
          "type": "function_definition",
          "line_start": 1074,
          "line_end": 1109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_unpublished_page",
          "type": "function_definition",
          "line_start": 1111,
          "line_end": 1189,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1111,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit_post_unpublished_page is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1381,
          "ai_signals": []
        },
        {
          "name": "test_required_field_validation_skipped_when_saving_draft",
          "type": "function_definition",
          "line_start": 1191,
          "line_end": 1206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_save_draft_streampage_with_empty_blocks_in_body",
          "type": "function_definition",
          "line_start": 1208,
          "line_end": 1241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_required_field_validation_enforced_on_publish",
          "type": "function_definition",
          "line_start": 1243,
          "line_end": 1255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_publish_streampage_with_empty_blocks_in_body",
          "type": "function_definition",
          "line_start": 1257,
          "line_end": 1291,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_required_asterisk_on_reshowing_form",
          "type": "function_definition",
          "line_start": 1293,
          "line_end": 1343,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1339,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1342,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1293,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_required_asterisk_on_reshowing_form is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3683,
          "ai_signals": [
            "High anti-pattern density (0.78)"
          ]
        },
        {
          "name": "test_page_edit_post_when_locked",
          "type": "function_definition",
          "line_start": 1345,
          "line_end": 1367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_when_locked_with_json_response",
          "type": "function_definition",
          "line_start": 1369,
          "line_end": 1400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1390,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2032,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_scheduled",
          "type": "function_definition",
          "line_start": 1402,
          "line_end": 1471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 70,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1446,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1449,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1402,
              "description": "Function is 70 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 70 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_scheduled is 70 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2438,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_scheduled_custom_timezone",
          "type": "function_definition",
          "line_start": 1473,
          "line_end": 1551,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 1474,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 1474,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1488,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1523,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1527,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1473,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_scheduled_custom_timezone is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3596,
          "ai_signals": [
            "High anti-pattern density (0.76)"
          ]
        },
        {
          "name": "test_schedule_panel_without_publish_permission",
          "type": "function_definition",
          "line_start": 1553,
          "line_end": 1563,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1555,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.412,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_edit_scheduled_go_live_before_expiry",
          "type": "function_definition",
          "line_start": 1565,
          "line_end": 1610,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1585,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1590,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1597,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1605,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1606,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1565,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_scheduled_go_live_before_expiry is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_scheduled_expire_in_the_past",
          "type": "function_definition",
          "line_start": 1612,
          "line_end": 1649,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1629,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1636,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1644,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1645,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1612,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_scheduled_expire_in_the_past is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_invalid_schedule_with_existing_draft_schedule",
          "type": "function_definition",
          "line_start": 1651,
          "line_end": 1717,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1679,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1682,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1697,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1707,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1715,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1716,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1651,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_invalid_schedule_with_existing_draft_schedule is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_edit_post_publish",
          "type": "function_definition",
          "line_start": 1719,
          "line_end": 1777,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 1773,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1773,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1773,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1719,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit_post_publish is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3311,
          "ai_signals": [
            "High anti-pattern density (0.68)"
          ]
        },
        {
          "name": "test_first_published_at_editable",
          "type": "function_definition",
          "line_start": 1779,
          "line_end": 1819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1779,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_first_published_at_editable is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1791,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_scheduled_unpublished_page",
          "type": "function_definition",
          "line_start": 1821,
          "line_end": 1894,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1868,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1871,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1888,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1821,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_scheduled_unpublished_page is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.283,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_edit_post_publish_now_an_already_scheduled_unpublished_page",
          "type": "function_definition",
          "line_start": 1896,
          "line_end": 1968,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1962,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1896,
              "description": "Function is 73 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_now_an_already_scheduled_unpublished_page is 73 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1897,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_scheduled_published_page",
          "type": "function_definition",
          "line_start": 1970,
          "line_end": 2058,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 89,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2032,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2035,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2052,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1970,
              "description": "Function is 89 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 89 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_scheduled_published_page is 89 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2511,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_now_an_already_scheduled_published_page",
          "type": "function_definition",
          "line_start": 2060,
          "line_end": 2134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2060,
              "description": "Function is 75 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_now_an_already_scheduled_published_page is 75 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1404,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_save_schedule_before_a_scheduled_expire_page",
          "type": "function_definition",
          "line_start": 2136,
          "line_end": 2234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 99,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2215,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2218,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2136,
              "description": "Function is 99 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 99 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_save_schedule_before_a_scheduled_expire_page is 99 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1998,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_schedule_before_a_scheduled_expire_page",
          "type": "function_definition",
          "line_start": 2236,
          "line_end": 2335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 100,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2312,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2329,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2236,
              "description": "Function is 100 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 100 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_schedule_before_a_scheduled_expire_page is 100 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2338,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_schedule_after_a_scheduled_expire_page",
          "type": "function_definition",
          "line_start": 2337,
          "line_end": 2439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 103,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2413,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2416,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2433,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2337,
              "description": "Function is 103 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 103 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_schedule_after_a_scheduled_expire_page is 103 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2297,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_submit",
          "type": "function_definition",
          "line_start": 2441,
          "line_end": 2469,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_existing_slug",
          "type": "function_definition",
          "line_start": 2471,
          "line_end": 2498,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2495,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2188,
          "ai_signals": []
        },
        {
          "name": "test_preview_on_edit",
          "type": "function_definition",
          "line_start": 2500,
          "line_end": 2531,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2515,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2523,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2524,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4219,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ]
        },
        {
          "name": "test_preview_on_edit_no_session_key",
          "type": "function_definition",
          "line_start": 2533,
          "line_end": 2553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2547,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2604,
          "ai_signals": []
        },
        {
          "name": "test_preview_does_not_cache",
          "type": "decorated_definition",
          "line_start": 2555,
          "line_end": 2588,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2583,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2588,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2997,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ],
          "decorators": [
            "override_settings(\n        CACHES={\n            \"default\": {\n                \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\n            }\n        }\n    )",
            "modify_settings(\n        MIDDLEWARE={\n            \"append\": \"django.middleware.cache.FetchFromCacheMiddleware\",\n            \"prepend\": \"django.middleware.cache.UpdateCacheMiddleware\",\n        }\n    )"
          ]
        },
        {
          "name": "test_preview_uses_correct_site",
          "type": "decorated_definition",
          "line_start": 2590,
          "line_end": 2621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2609,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2617,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2619,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4219,
          "ai_signals": [
            "High anti-pattern density (0.94)"
          ],
          "decorators": [
            "modify_settings(ALLOWED_HOSTS={\"append\": \"childpage.example.com\"})"
          ]
        },
        {
          "name": "test_editor_picks_up_direct_model_edits",
          "type": "function_definition",
          "line_start": 2623,
          "line_end": 2636,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_editor_does_not_pick_up_direct_model_edits_when_draft_edits_exist",
          "type": "function_definition",
          "line_start": 2638,
          "line_end": 2656,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_editor_page_shows_live_url_in_status_when_draft_edits_exist",
          "type": "function_definition",
          "line_start": 2658,
          "line_end": 2683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2678,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2682,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2683,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_editor_page_shows_custom_live_url_in_status_when_draft_edits_exist",
          "type": "function_definition",
          "line_start": 2685,
          "line_end": 2709,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2704,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2708,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2709,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_before_edit_page_hook",
          "type": "function_definition",
          "line_start": 2711,
          "line_end": 2724,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2724,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3438,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_before_edit_page_hook_with_json_response",
          "type": "function_definition",
          "line_start": 2726,
          "line_end": 2762,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2747,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2762,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.283,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_before_edit_page_hook_post",
          "type": "function_definition",
          "line_start": 2764,
          "line_end": 2787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2784,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2396,
          "ai_signals": []
        },
        {
          "name": "test_before_edit_page_hook_post_with_json_response",
          "type": "function_definition",
          "line_start": 2789,
          "line_end": 2853,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2816,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2845,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2789,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_before_edit_page_hook_post_with_json_response is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2553,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_page_hook",
          "type": "function_definition",
          "line_start": 2855,
          "line_end": 2880,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2875,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2284,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_page_hook_with_json_response",
          "type": "function_definition",
          "line_start": 2882,
          "line_end": 2940,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2909,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 2932,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2882,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_after_edit_page_hook_with_json_response is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2717,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_after_publish_page",
          "type": "function_definition",
          "line_start": 2942,
          "line_end": 2964,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2962,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.246,
          "ai_signals": []
        },
        {
          "name": "test_before_publish_page",
          "type": "function_definition",
          "line_start": 2966,
          "line_end": 2988,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2986,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.246,
          "ai_signals": []
        },
        {
          "name": "test_override_default_action_menu_item",
          "type": "function_definition",
          "line_start": 2990,
          "line_end": 3011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 2992,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2996,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 2996,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3004,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_override_publish_action_menu_item_label",
          "type": "function_definition",
          "line_start": 3013,
          "line_end": 3029,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3013,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3015,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3028,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_alias_page",
          "type": "function_definition",
          "line_start": 3031,
          "line_end": 3052,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3038,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3038,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3044,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_alias_page_from_draft_page",
          "type": "function_definition",
          "line_start": 3054,
          "line_end": 3077,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3064,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3064,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3069,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_post_edit_alias_page",
          "type": "function_definition",
          "line_start": 3079,
          "line_end": 3092,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_edit_after_change_language_code",
          "type": "function_definition",
          "line_start": 3094,
          "line_end": 3125,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_edit_after_change_language_code_without_revisions",
          "type": "function_definition",
          "line_start": 3127,
          "line_end": 3156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_num_queries_as_superuser",
          "type": "function_definition",
          "line_start": 3158,
          "line_end": 3166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_num_queries_as_editor",
          "type": "function_definition",
          "line_start": 3168,
          "line_end": 3179,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3170,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3854,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3183,
          "line_end": 3204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "check_order",
          "type": "function_definition",
          "line_start": 3206,
          "line_end": 3209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3207,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_order",
          "type": "function_definition",
          "line_start": 3211,
          "line_end": 3217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_reorder",
          "type": "function_definition",
          "line_start": 3219,
          "line_end": 3264,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3219,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_reorder is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1699,
          "ai_signals": []
        },
        {
          "name": "test_reorder_with_validation_error",
          "type": "function_definition",
          "line_start": 3266,
          "line_end": 3301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_issue_197",
          "type": "function_definition",
          "line_start": 3305,
          "line_end": 3340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3349,
          "line_end": 3363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_get_create_form",
          "type": "function_definition",
          "line_start": 3365,
          "line_end": 3377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3373,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_post_create_form",
          "type": "function_definition",
          "line_start": 3379,
          "line_end": 3409,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_post_create_form_with_validation_error_in_formset",
          "type": "function_definition",
          "line_start": 3411,
          "line_end": 3435,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_form",
          "type": "function_definition",
          "line_start": 3437,
          "line_end": 3457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3443,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2604,
          "ai_signals": []
        },
        {
          "name": "test_post_edit_form",
          "type": "function_definition",
          "line_start": 3459,
          "line_end": 3487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_post_edit_form_with_validation_error_in_formset",
          "type": "function_definition",
          "line_start": 3489,
          "line_end": 3509,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3520,
          "line_end": 3533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_page_edit_post_publish_url",
          "type": "function_definition",
          "line_start": 3535,
          "line_end": 3573,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 3571,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3571,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3571,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3535,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_page_edit_post_publish_url is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3583,
          "line_end": 3585,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "_create_page",
          "type": "function_definition",
          "line_start": 3587,
          "line_end": 3603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_create_accessible",
          "type": "function_definition",
          "line_start": 3605,
          "line_end": 3617,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 3615,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3615,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_inaccessible",
          "type": "function_definition",
          "line_start": 3619,
          "line_end": 3631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 3629,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3629,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_edit_page",
          "type": "function_definition",
          "line_start": 3633,
          "line_end": 3652,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_edit_accessible",
          "type": "function_definition",
          "line_start": 3654,
          "line_end": 3666,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 3664,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3664,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_inaccessible",
          "type": "function_definition",
          "line_start": 3668,
          "line_end": 3680,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 3678,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3678,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4438,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3686,
          "line_end": 3693,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_create_and_save",
          "type": "function_definition",
          "line_start": 3695,
          "line_end": 3735,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3695,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_and_save is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1791,
          "ai_signals": []
        },
        {
          "name": "test_create_and_publish",
          "type": "function_definition",
          "line_start": 3737,
          "line_end": 3777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3737,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_and_publish is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1791,
          "ai_signals": []
        },
        {
          "name": "test_edit_and_save",
          "type": "function_definition",
          "line_start": 3779,
          "line_end": 3819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3779,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_and_save is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1791,
          "ai_signals": []
        },
        {
          "name": "test_edit_and_publish",
          "type": "function_definition",
          "line_start": 3821,
          "line_end": 3858,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3821,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_and_publish is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1859,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3864,
          "line_end": 3867,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_field_error",
          "type": "function_definition",
          "line_start": 3869,
          "line_end": 3925,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 57,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3901,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3869,
              "description": "Function is 57 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 57 lines (> 37 dynamic threshold)",
                "impact": "Function test_field_error is 57 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2166,
          "ai_signals": []
        },
        {
          "name": "test_field_error_with_json_response",
          "type": "function_definition",
          "line_start": 3927,
          "line_end": 3965,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 3959,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3927,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_field_error_with_json_response is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2733,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_non_field_error",
          "type": "function_definition",
          "line_start": 3967,
          "line_end": 4005,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3967,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_non_field_error is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1835,
          "ai_signals": []
        },
        {
          "name": "test_field_and_non_field_error",
          "type": "function_definition",
          "line_start": 4007,
          "line_end": 4080,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4044,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4007,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function test_field_and_non_field_error is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1884,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4086,
          "line_end": 4094,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_get_edit_form",
          "type": "function_definition",
          "line_start": 4096,
          "line_end": 4128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_post_edit",
          "type": "function_definition",
          "line_start": 4130,
          "line_end": 4183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4130,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_edit is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1586,
          "ai_signals": []
        },
        {
          "name": "test_post_edit_with_json_response",
          "type": "function_definition",
          "line_start": 4185,
          "line_end": 4249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4232,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4185,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_post_edit_with_json_response is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2015,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4256,
          "line_end": 4262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 4264,
          "line_end": 4274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 4276,
          "line_end": 4287,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_dropdown_not_present_without_permission_to_edit",
          "type": "function_definition",
          "line_start": 4289,
          "line_end": 4317,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 4301,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4304,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3352,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4321,
          "line_end": 4336,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_comment_notifications_switched_off",
          "type": "function_definition",
          "line_start": 4338,
          "line_end": 4352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_comment_notifications_switched_on",
          "type": "function_definition",
          "line_start": 4354,
          "line_end": 4367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_post_with_comment_notifications_switched_on",
          "type": "function_definition",
          "line_start": 4369,
          "line_end": 4390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_post_with_comment_notifications_switched_off",
          "type": "function_definition",
          "line_start": 4392,
          "line_end": 4412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_comments_disabled",
          "type": "decorated_definition",
          "line_start": 4414,
          "line_end": 4424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "test_post_comments_disabled",
          "type": "decorated_definition",
          "line_start": 4426,
          "line_end": 4442,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4450,
          "line_end": 4489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4450,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1813,
          "ai_signals": []
        },
        {
          "name": "assertNeverEmailedWrongUser",
          "type": "function_definition",
          "line_start": 4491,
          "line_end": 4495,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_comments_enabled_by_default",
          "type": "function_definition",
          "line_start": 4497,
          "line_end": 4508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4504,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3854,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_comments_disabled",
          "type": "decorated_definition",
          "line_start": 4510,
          "line_end": 4522,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4518,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.363,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_COMMENTS_ENABLED=False)"
          ]
        },
        {
          "name": "test_new_comment",
          "type": "function_definition",
          "line_start": 4524,
          "line_end": 4577,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4524,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_new_comment is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1586,
          "ai_signals": []
        },
        {
          "name": "test_new_comment_json",
          "type": "function_definition",
          "line_start": 4579,
          "line_end": 4647,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 4616,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4579,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_new_comment_json is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1952,
          "ai_signals": []
        },
        {
          "name": "test_edit_comment",
          "type": "function_definition",
          "line_start": 4649,
          "line_end": 4702,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 54,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4649,
              "description": "Function is 54 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 54 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_comment is 54 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1586,
          "ai_signals": []
        },
        {
          "name": "test_edit_another_users_comment",
          "type": "function_definition",
          "line_start": 4704,
          "line_end": 4751,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4737,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4704,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_another_users_comment is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2396,
          "ai_signals": []
        },
        {
          "name": "test_resolve_comment",
          "type": "function_definition",
          "line_start": 4753,
          "line_end": 4825,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4753,
              "description": "Function is 73 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 37 dynamic threshold)",
                "impact": "Function test_resolve_comment is 73 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1417,
          "ai_signals": []
        },
        {
          "name": "test_delete_comment",
          "type": "function_definition",
          "line_start": 4827,
          "line_end": 4886,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4827,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_delete_comment is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1521,
          "ai_signals": []
        },
        {
          "name": "test_new_reply",
          "type": "function_definition",
          "line_start": 4888,
          "line_end": 4969,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 82,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4888,
              "description": "Function is 82 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 82 lines (> 37 dynamic threshold)",
                "impact": "Function test_new_reply is 82 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1365,
          "ai_signals": []
        },
        {
          "name": "test_edit_reply",
          "type": "function_definition",
          "line_start": 4971,
          "line_end": 5032,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 4971,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_reply is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1502,
          "ai_signals": []
        },
        {
          "name": "test_delete_reply",
          "type": "function_definition",
          "line_start": 5034,
          "line_end": 5095,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5034,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_delete_reply is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1502,
          "ai_signals": []
        },
        {
          "name": "test_updated_comments_notifications_profile_setting",
          "type": "function_definition",
          "line_start": 5097,
          "line_end": 5136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5097,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_updated_comments_notifications_profile_setting is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1813,
          "ai_signals": []
        },
        {
          "name": "test_updated_comments_notifications_active_users_only",
          "type": "function_definition",
          "line_start": 5138,
          "line_end": 5176,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5138,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_updated_comments_notifications_active_users_only is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1835,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 5184,
          "line_end": 5203,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0938,
          "ai_signals": []
        },
        {
          "name": "test_only_comments_with_valid_paths_are_shown",
          "type": "function_definition",
          "line_start": 5205,
          "line_end": 5240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 5235,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.191,
          "ai_signals": []
        },
        {
          "name": "test_comments_with_deep_contentpath_on_custom_fields",
          "type": "function_definition",
          "line_start": 5242,
          "line_end": 5310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 69,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 5296,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 5242,
              "description": "Function is 69 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 69 lines (> 37 dynamic threshold)",
                "impact": "Function test_comments_with_deep_contentpath_on_custom_fields is 69 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1952,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 144,
        "avg_function_length": 35.03,
        "function_length_stddev": 26.07,
        "import_count": 25,
        "export_count": 0,
        "comment_lines": 503,
        "code_lines": 4808,
        "comment_ratio": 0.0947,
        "comment_what_ratio": 0.213,
        "naming_avg_length": 7.4,
        "debug_artifacts": [],
        "ai_smell_count": 208,
        "ai_smell_density": 0.043261,
        "structural_uniformity": 0.2559,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.17,
        "mechanical": 81.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\pages\\test_reorder_page.py",
      "language": "python",
      "line_count": 244,
      "token_estimate": 2318,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_set_page_position_get_request_with_simple_page",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_set_page_position_without_position_argument_moves_it_to_the_end",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_set_page_position_non_integer_position_moves_it_to_the_end",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_move_page_position_up",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 93,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_move_page_position_down",
          "type": "function_definition",
          "line_start": 95,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_move_page_position_to_the_same_position",
          "type": "function_definition",
          "line_start": 107,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "test_page_set_page_position_with_invalid_target_position",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 15.42,
        "function_length_stddev": 9.47,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 64,
        "code_lines": 180,
        "comment_ratio": 0.2623,
        "comment_what_ratio": 0.1143,
        "naming_avg_length": 7.47,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3856,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.37,
        "mechanical": 98.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_block_preview.py",
      "language": "python",
      "line_count": 253,
      "token_estimate": 2408,
      "functions": [
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 16,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0597,
          "ai_signals": []
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 31,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2931,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_nonexisting_block",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0597,
          "ai_signals": []
        },
        {
          "name": "test_no_admin_permission",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0597,
          "ai_signals": []
        },
        {
          "name": "test_minimal_permission",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 80,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.329,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_no_preview_value_no_default",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 94,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_value_falls_back_to_default",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 108,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 112,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_template",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 132,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 136,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 140,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 142,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 152,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_value",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 183,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 187,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2489,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_custom_preview_context",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 194,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 220,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 223,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 228,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 229,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 231,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 192,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_custom_preview_context is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_static_image_preview",
          "type": "function_definition",
          "line_start": 233,
          "line_end": 252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 247,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 248,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4097,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 19.08,
        "function_length_stddev": 13.39,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 251,
        "comment_ratio": 0.0079,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.72,
        "debug_artifacts": [],
        "ai_smell_count": 23,
        "ai_smell_density": 0.091633,
        "structural_uniformity": 0.2986,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.24,
        "mechanical": 72.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_dbwhitelister.py",
      "language": "python",
      "line_count": 136,
      "token_estimate": 1496,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_clean_tag_node_div",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_clean_tag_node_with_data_embedtype",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 20,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 20,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 25,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 25,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4501,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_clean_tag_node_with_data_linktype",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_clean_tag_node",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "assertHtmlEqual",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_page_link_is_rewritten",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_document_link_is_rewritten",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        },
        {
          "name": "test_image_embed_is_rewritten",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 80,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 82,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 87,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4501,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_media_embed_is_rewritten",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 95,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 96,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4501,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_div_conversion",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 110,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3501,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_whitelist_with_feature_list",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 135,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1001,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 8.77,
        "function_length_stddev": 4.38,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 131,
        "comment_ratio": 0.0368,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.076336,
        "structural_uniformity": 0.5004,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.92,
        "mechanical": 80.92,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_jinja2.py",
      "language": "python",
      "line_count": 50,
      "token_estimate": 396,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1548,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1548,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "dummy_request",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1548,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "test_userbar",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1548,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        },
        {
          "name": "test_userbar_anonymous_user",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1548,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.77)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 7,
        "function_length_stddev": 1.58,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 49,
        "comment_ratio": 0.02,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7741,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.9,
        "mechanical": 98.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_privacy.py",
      "language": "python",
      "line_count": 632,
      "token_estimate": 5652,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 66,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 55,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 57,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 58,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 12,
              "description": "Function is 55 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 55 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 55 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4888,
          "ai_signals": [
            "High anti-pattern density (0.55)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_get_public",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 77,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 79,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 82,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6479,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_get_private",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 103,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 94,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 95,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 96,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 100,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 103,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6479,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_get_private_child",
          "type": "function_definition",
          "line_start": 105,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 122,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 122,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6022,
          "ai_signals": [
            "High anti-pattern density (0.87)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_set_password_restriction",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_set_password_restriction_password_unset",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 181,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_unset_password_restriction",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_set_shared_password_page",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 231,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 224,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 228,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6479,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_unset_shared_password_page",
          "type": "decorated_definition",
          "line_start": 233,
          "line_end": 251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 241,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 243,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6479,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.85)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_PRIVATE_PAGE_OPTIONS={\"SHARED_PASSWORD\": False})"
          ]
        },
        {
          "name": "test_get_private_groups",
          "type": "function_definition",
          "line_start": 253,
          "line_end": 273,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 264,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 265,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 266,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 269,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 270,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 272,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6479,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_set_group_restriction",
          "type": "function_definition",
          "line_start": 275,
          "line_end": 310,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_set_group_restriction_password_unset",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 331,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_unset_group_restriction",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 355,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_explorer_public",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 403,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_explorer_private",
          "type": "function_definition",
          "line_start": 414,
          "line_end": 434,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 425,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_explorer_private_child",
          "type": "function_definition",
          "line_start": 436,
          "line_end": 456,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 447,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_explorer_list_homepage",
          "type": "function_definition",
          "line_start": 458,
          "line_end": 474,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_explorer_list_private",
          "type": "function_definition",
          "line_start": 476,
          "line_end": 493,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2979,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_edit_public",
          "type": "function_definition",
          "line_start": 495,
          "line_end": 518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 506,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 508,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5895,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_edit_private",
          "type": "function_definition",
          "line_start": 520,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 531,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 533,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5779,
          "ai_signals": [
            "High anti-pattern density (0.80)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_edit_private_child",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 566,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 558,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4645,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_private_page_options_only_password_groups",
          "type": "function_definition",
          "line_start": 568,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 582,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 582,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5895,
          "ai_signals": [
            "High anti-pattern density (0.83)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_private_page_options_only_password_login",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 613,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_stream_no_chunk_check",
              "severity": "medium",
              "line": 604,
              "description": "Streaming response iterated without checking chunk validity",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 604,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6312,
          "ai_signals": [
            "High anti-pattern density (0.95)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        },
        {
          "name": "test_private_page_no_options",
          "type": "function_definition",
          "line_start": 615,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 626,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5038,
          "ai_signals": [
            "High anti-pattern density (0.59)",
            "Comments explain 'what' not 'why' (0.85)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 25,
        "avg_function_length": 23.76,
        "function_length_stddev": 8.63,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 118,
        "code_lines": 514,
        "comment_ratio": 0.1867,
        "comment_what_ratio": 0.8525,
        "naming_avg_length": 7.31,
        "debug_artifacts": [],
        "ai_smell_count": 40,
        "ai_smell_density": 0.077821,
        "structural_uniformity": 0.6369,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 76.42,
        "mechanical": 76.42,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\test_views.py",
      "language": "python",
      "line_count": 249,
      "token_estimate": 2365,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_success_redirect",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_success_redirect_honour_redirect_get_parameter",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_success_redirect_honour_redirect_post_parameter",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_already_authenticated_redirect",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_already_authenticated_redirect_honour_redirect_get_parameter",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_unauthenticated_redirect_to_custom_login_url",
          "type": "decorated_definition",
          "line_start": 71,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILADMIN_LOGIN_URL=\"http://example.com/login/\")"
          ]
        },
        {
          "name": "test_language_code",
          "type": "decorated_definition",
          "line_start": 80,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"de\")"
          ]
        },
        {
          "name": "test_bidi_language_changes_dir_attribute",
          "type": "decorated_definition",
          "line_start": 88,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(LANGUAGE_CODE=\"he\")"
          ]
        },
        {
          "name": "test_login_page_renders_extra_fields",
          "type": "decorated_definition",
          "line_start": 96,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_USER_LOGIN_FORM=\"wagtail.admin.tests.test_forms.CustomLoginForm\"\n    )"
          ]
        },
        {
          "name": "test_login_page_renders_custom_form_non_field_errors",
          "type": "decorated_definition",
          "line_start": 119,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_USER_LOGIN_FORM=\"wagtail.admin.tests.test_forms.CustomLoginForm\"\n    )"
          ]
        },
        {
          "name": "test_login_page_renders_custom_form_login_error",
          "type": "decorated_definition",
          "line_start": 133,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 146,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 146,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 148,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5273,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_USER_LOGIN_FORM=\"wagtail.admin.tests.test_forms.CustomLoginForm\"\n    )"
          ]
        },
        {
          "name": "test_session_expire_on_browser_close",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        },
        {
          "name": "test_session_expiry_remember",
          "type": "decorated_definition",
          "line_start": 160,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(SESSION_COOKIE_AGE=7)"
          ]
        },
        {
          "name": "test_password_whitespace_not_stripped",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 170,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 170,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 177,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5273,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_password_reset_view_uses_correct_form",
          "type": "function_definition",
          "line_start": 194,
          "line_end": 202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 196,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 202,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5273,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_password_reset_page_renders_extra_fields",
          "type": "decorated_definition",
          "line_start": 204,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        WAGTAILADMIN_USER_PASSWORD_RESET_FORM=\"wagtail.admin.tests.test_forms.CustomPasswordResetForm\"\n    )"
          ]
        },
        {
          "name": "test_jsi18n_does_not_require_login",
          "type": "function_definition",
          "line_start": 229,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 233,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5273,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_jsi18n_is_localized",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1773,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 19,
        "avg_function_length": 11.16,
        "function_length_stddev": 5.73,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 226,
        "comment_ratio": 0.0924,
        "comment_what_ratio": 0.4,
        "naming_avg_length": 8.89,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.039823,
        "structural_uniformity": 0.4867,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.96,
        "mechanical": 88.96,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\tests\\ui\\test_tables.py",
      "language": "python",
      "line_count": 372,
      "token_estimate": 2799,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "test_table_render",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "test_table_render_with_caption",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 88,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "test_table_render_with_width",
          "type": "function_definition",
          "line_start": 90,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 99,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 110,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2853,
          "ai_signals": [
            "High anti-pattern density (0.65)"
          ]
        },
        {
          "name": "test_title_column",
          "type": "function_definition",
          "line_start": 122,
          "line_end": 174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 140,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 122,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_title_column is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1916,
          "ai_signals": []
        },
        {
          "name": "test_column_media",
          "type": "function_definition",
          "line_start": 176,
          "line_end": 194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 179,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 194,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4095,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_row_classname",
          "type": "function_definition",
          "line_start": 196,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 216,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 196,
              "description": "Function is 46 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 37 dynamic threshold)",
                "impact": "Function test_row_classname is 46 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2117,
          "ai_signals": []
        },
        {
          "name": "test_row_attrs",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 290,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 265,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 243,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_row_attrs is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2054,
          "ai_signals": []
        },
        {
          "name": "test_table_and_row_in_context",
          "type": "function_definition",
          "line_start": 292,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 292,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_table_and_row_in_context is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1493,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "render_component",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 340,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        },
        {
          "name": "test_table_render",
          "type": "function_definition",
          "line_start": 342,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0595,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 13,
        "avg_function_length": 26.15,
        "function_length_stddev": 18.37,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 138,
        "code_lines": 234,
        "comment_ratio": 0.371,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.56,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.047009,
        "structural_uniformity": 0.2976,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.4,
        "mechanical": 83.4,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\editing_sessions.py",
      "language": "python",
      "line_count": 51,
      "token_estimate": 403,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 6,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 45,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0401,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 8.75,
        "function_length_stddev": 7.23,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 51,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.32,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.1739,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\ui\\tables\\pages.py",
      "language": "python",
      "line_count": 179,
      "token_estimate": 1875,
      "functions": [
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 70,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_header_context_data",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 87,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "render_header_html",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 113,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 128,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 132,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 135,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_ascending_title_text",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 141,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_descending_title_text",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 147,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_row_classname",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0167,
          "ai_signals": []
        },
        {
          "name": "get_row_attrs",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 160,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3667,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 165,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2355,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 9.64,
        "function_length_stddev": 8.84,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 164,
        "comment_ratio": 0.0838,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.58,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.054878,
        "structural_uniformity": 0.0836,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 82.78,
        "mechanical": 82.78,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\userbar.py",
      "language": "python",
      "line_count": 402,
      "token_estimate": 3842,
      "functions": [
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_include",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 144,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_exclude",
          "type": "function_definition",
          "line_start": 146,
          "line_end": 148,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_run_only",
          "type": "function_definition",
          "line_start": 150,
          "line_end": 152,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_rules",
          "type": "function_definition",
          "line_start": 154,
          "line_end": 156,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_custom_rules",
          "type": "function_definition",
          "line_start": 158,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_custom_checks",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_messages",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 168,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_context",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_options",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_spec",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_axe_configuration",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 247,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "render_html",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 293,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 285,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1795,
          "ai_signals": []
        },
        {
          "name": "apply_userbar_hooks",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 297,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3227,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 312,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0045,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 9,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 86,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 331,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 368,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 316,
              "description": "Function is 86 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 86 lines (> 30 dynamic threshold)",
                "impact": "Function get_context_data is 86 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1266,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 23,
        "avg_function_length": 10.09,
        "function_length_stddev": 17.34,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 65,
        "code_lines": 337,
        "comment_ratio": 0.1617,
        "comment_what_ratio": 0.0227,
        "naming_avg_length": 6.73,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.014837,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.0,
        "mechanical": 93.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\bulk_action\\registry.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 410,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0006,
          "ai_signals": []
        },
        {
          "name": "_scan_for_bulk_actions",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 12,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 19,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 20,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 21,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 24,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3506,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_bulk_actions_for_model",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 29,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 29,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 29,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 31,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3506,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_bulk_action_class",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 33,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3506,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 7.25,
        "function_length_stddev": 7.23,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 41,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.0,
        "debug_artifacts": [],
        "ai_smell_count": 11,
        "ai_smell_density": 0.268293,
        "structural_uniformity": 0.003,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.25,
        "mechanical": 70.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\chooser.py",
      "language": "python",
      "line_count": 595,
      "token_estimate": 4659,
      "functions": [
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "model_class",
          "type": "decorated_definition",
          "line_start": 68,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_preserved_param_string",
          "type": "decorated_definition",
          "line_start": 82,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 83,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 83,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 85,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 85,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 85,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 88,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "append_preserved_url_parameters",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 93,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 93,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 96,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 96,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 98,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 98,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 100,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 100,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 102,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 102,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "i18n_enabled",
          "type": "decorated_definition",
          "line_start": 137,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_object_list",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "apply_object_list_ordering",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 154,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 154,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 154,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filter_form_class",
          "type": "function_definition",
          "line_start": 162,
          "line_end": 180,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 169,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 169,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 171,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 171,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 174,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 174,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_filter_form",
          "type": "function_definition",
          "line_start": 182,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "filter_object_list",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 203,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 188,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 191,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 198,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_results_url",
          "type": "function_definition",
          "line_start": 205,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 206,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 206,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_chosen_multiple_url",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 209,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 209,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "is_multiple_choice",
          "type": "decorated_definition",
          "line_start": 213,
          "line_end": 215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "columns",
          "type": "decorated_definition",
          "line_start": 217,
          "line_end": 222,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "title_column",
          "type": "decorated_definition",
          "line_start": 224,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 229,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 231,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 231,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 236,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 239,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 239,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "checkbox_column",
          "type": "decorated_definition",
          "line_start": 246,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 249,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 249,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_results_page",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 261,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 263,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 269,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 269,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 303,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 305,
          "line_end": 306,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_permission_policy",
          "type": "function_definition",
          "line_start": 324,
          "line_end": 330,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "can_create",
          "type": "function_definition",
          "line_start": 332,
          "line_end": 335,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_class",
          "type": "function_definition",
          "line_start": 337,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_creation_form_kwargs",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_creation_form",
          "type": "function_definition",
          "line_start": 358,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_create_url",
          "type": "function_definition",
          "line_start": 365,
          "line_end": 371,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 371,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 371,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_creation_form_context_data",
          "type": "function_definition",
          "line_start": 373,
          "line_end": 379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 377,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 378,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 407,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 396,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 397,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 398,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_response_json_data",
          "type": "function_definition",
          "line_start": 409,
          "line_end": 412,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 415,
          "line_end": 422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 436,
          "line_end": 441,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 439,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_object_id",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 457,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_display_title",
          "type": "function_definition",
          "line_start": 459,
          "line_end": 463,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_edit_item_url",
          "type": "function_definition",
          "line_start": 465,
          "line_end": 466,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_chosen_response_data",
          "type": "function_definition",
          "line_start": 468,
          "line_end": 476,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "_wrap_chosen_response_data",
          "type": "function_definition",
          "line_start": 478,
          "line_end": 488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_multiple_chosen_response",
          "type": "function_definition",
          "line_start": 490,
          "line_end": 492,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_chosen_response",
          "type": "function_definition",
          "line_start": 494,
          "line_end": 505,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 514,
          "line_end": 515,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 517,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_objects",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 541,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 555,
          "line_end": 558,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 560,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "save_form",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 565,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 567,
          "line_end": 573,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0914,
          "ai_signals": []
        },
        {
          "name": "get_reshow_creation_form_response",
          "type": "function_definition",
          "line_start": 575,
          "line_end": 590,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 578,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 588,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4414,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 47,
        "avg_function_length": 7.79,
        "function_length_stddev": 5.96,
        "import_count": 26,
        "export_count": 0,
        "comment_lines": 65,
        "code_lines": 530,
        "comment_ratio": 0.1092,
        "comment_what_ratio": 0.2222,
        "naming_avg_length": 8.62,
        "debug_artifacts": [],
        "ai_smell_count": 52,
        "ai_smell_density": 0.098113,
        "structural_uniformity": 0.2347,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.74,
        "mechanical": 72.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\generic\\preview.py",
      "language": "python",
      "line_count": 230,
      "token_estimate": 2015,
      "functions": [
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "remove_old_preview_data",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_form",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_form_state_queryset",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "_get_form_state",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "_get_form_data",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 80,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "validate_form",
          "type": "function_definition",
          "line_start": 82,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "error_response",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_extra_request_attrs",
          "type": "function_definition",
          "line_start": 116,
          "line_end": 120,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "decorated_definition",
          "line_start": 122,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 134,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2919,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ],
          "decorators": [
            "method_decorator(xframe_options_sameorigin_override)"
          ]
        },
        {
          "name": "delete",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 150,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 150,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4475,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 157,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 164,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_revision_object",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 173,
          "line_end": 181,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 178,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4475,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "block_id",
          "type": "decorated_definition",
          "line_start": 188,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "block_def",
          "type": "decorated_definition",
          "line_start": 192,
          "line_end": 196,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "block_value",
          "type": "decorated_definition",
          "line_start": 198,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "page_title",
          "type": "decorated_definition",
          "line_start": 202,
          "line_end": 207,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 204,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 205,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4475,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "base_context",
          "type": "decorated_definition",
          "line_start": 209,
          "line_end": 221,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_template_names",
          "type": "function_definition",
          "line_start": 223,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0975,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 27,
        "avg_function_length": 5.93,
        "function_length_stddev": 4.73,
        "import_count": 18,
        "export_count": 0,
        "comment_lines": 7,
        "code_lines": 223,
        "comment_ratio": 0.0304,
        "comment_what_ratio": 0.2857,
        "naming_avg_length": 8.12,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.026906,
        "structural_uniformity": 0.2017,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.35,
        "mechanical": 91.35,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\bulk_actions\\__init__.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 66,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 4,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 12.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\copy.py",
      "language": "python",
      "line_count": 123,
      "token_estimate": 1229,
      "functions": [
        {
          "name": "copy",
          "type": "decorated_definition",
          "line_start": 16,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 107,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 104,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 16,
              "description": "Function is 107 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 107 lines (> 37 dynamic threshold)",
                "impact": "Function copy is 107 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1648,
          "ai_signals": [],
          "decorators": [
            "user_passes_test(user_has_any_page_permission)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 107,
        "function_length_stddev": 0.0,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 111,
        "comment_ratio": 0.0976,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.63,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.027027,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.24,
        "mechanical": 78.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\pages\\ordering.py",
      "language": "python",
      "line_count": 45,
      "token_estimate": 411,
      "functions": [
        {
          "name": "set_page_position",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 24,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 8,
              "description": "Function is 37 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 37 lines (> 30 dynamic threshold)",
                "impact": "Function set_page_position is 37 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2392,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 37,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 37,
        "comment_ratio": 0.1778,
        "comment_what_ratio": 0.25,
        "naming_avg_length": 7.34,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.054054,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 56.89,
        "mechanical": 56.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\reports\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 14,
      "functions": [
        {
          "name": "__file_level__",
          "type": "file",
          "line_start": 0,
          "line_end": 0,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 0,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import PageReportView, ReportView",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'PageReportView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import PageReportView, ReportView",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            },
            {
              "id": "python_unused_import",
              "severity": "medium",
              "line": 1,
              "description": "Unused import: from .base import PageReportView, ReportView",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "import-analysis",
                "proof": "Import 'ReportView' is not referenced in file body",
                "impact": "Dead import adds noise and slows compilation",
                "recommendation": "Remove: from .base import PageReportView, ReportView",
                "confidence": 0.9,
                "fix_type": "deterministic",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.2,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 2
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\views\\workflows.py",
      "language": "python",
      "line_count": 1050,
      "token_estimate": 9318,
      "functions": [
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 67,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_cell_context_data",
          "type": "function_definition",
          "line_start": 77,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 4,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 94,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 100,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "filter_show_disabled",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "show_disabled",
          "type": "function_definition",
          "line_start": 148,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 159,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 153,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 161,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_initial_form_instance",
          "type": "function_definition",
          "line_start": 187,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 191,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 191,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_pages_formset",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 199,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 196,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 199,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_content_type_form",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 205,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 207,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 233,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 235,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_edit_handler",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 283,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_pages_formset",
          "type": "function_definition",
          "line_start": 285,
          "line_end": 291,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 288,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 291,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_content_type_form",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_paginated_pages",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 307,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_enable_url",
          "type": "decorated_definition",
          "line_start": 336,
          "line_end": 338,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "is_valid",
          "type": "function_definition",
          "line_start": 340,
          "line_end": 356,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "decorated_definition",
          "line_start": 358,
          "line_end": 383,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "transaction.atomic()"
          ]
        },
        {
          "name": "get_edit_url",
          "type": "decorated_definition",
          "line_start": 398,
          "line_end": 400,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 402,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "delete_action",
          "type": "function_definition",
          "line_start": 417,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 431,
          "line_end": 443,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 445,
          "line_end": 446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 448,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 454,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 458,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 460,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_index_url",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_index_results_url",
          "type": "function_definition",
          "line_start": 466,
          "line_end": 467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 469,
          "line_end": 470,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_base_queryset",
          "type": "function_definition",
          "line_start": 472,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "enable_workflow",
          "type": "decorated_definition",
          "line_start": 481,
          "line_end": 507,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "require_POST"
          ]
        },
        {
          "name": "remove_workflow",
          "type": "decorated_definition",
          "line_start": 510,
          "line_end": 538,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "require_POST"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 550,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 550,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 551,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 558,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "show_disabled",
          "type": "function_definition",
          "line_start": 599,
          "line_end": 600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 602,
          "line_end": 616,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 618,
          "line_end": 621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "select_task_type",
          "type": "function_definition",
          "line_start": 624,
          "line_end": 654,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 631,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 643,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 644,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4319,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 667,
          "line_end": 683,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 668,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 668,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 671,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 673,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 685,
          "line_end": 686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 688,
          "line_end": 695,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 692,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 697,
          "line_end": 710,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 702,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 706,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "model",
          "type": "decorated_definition",
          "line_start": 727,
          "line_end": 729,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 728,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 728,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "page_title",
          "type": "decorated_definition",
          "line_start": 731,
          "line_end": 735,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "get_queryset",
          "type": "function_definition",
          "line_start": 737,
          "line_end": 739,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 741,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 744,
          "line_end": 745,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_breadcrumbs_items",
          "type": "function_definition",
          "line_start": 747,
          "line_end": 756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 752,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 754,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 758,
          "line_end": 770,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_enable_url",
          "type": "decorated_definition",
          "line_start": 772,
          "line_end": 774,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 789,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "decorated_definition",
          "line_start": 804,
          "line_end": 806,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "delete_action",
          "type": "function_definition",
          "line_start": 808,
          "line_end": 809,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "enable_task",
          "type": "decorated_definition",
          "line_start": 812,
          "line_end": 836,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": [],
          "decorators": [
            "require_POST"
          ]
        },
        {
          "name": "get_task_chosen_response",
          "type": "function_definition",
          "line_start": 839,
          "line_end": 854,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 858,
          "line_end": 864,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_create_model",
          "type": "function_definition",
          "line_start": 866,
          "line_end": 881,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 866,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 866,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_create_form_class",
          "type": "function_definition",
          "line_start": 883,
          "line_end": 891,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 887,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 887,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_create_form",
          "type": "function_definition",
          "line_start": 893,
          "line_end": 899,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 899,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4432,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_task_type_options",
          "type": "function_definition",
          "line_start": 901,
          "line_end": 917,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 908,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2991,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "get_task_type_filter_choices",
          "type": "function_definition",
          "line_start": 919,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_form_js_context",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 930,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_task_listing_context_data",
          "type": "function_definition",
          "line_start": 932,
          "line_end": 960,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_create_tab_context_data",
          "type": "function_definition",
          "line_start": 962,
          "line_end": 971,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 975,
          "line_end": 977,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 979,
          "line_end": 985,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 987,
          "line_end": 997,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 1001,
          "line_end": 1003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 1005,
          "line_end": 1019,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 1011,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3266,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1021,
          "line_end": 1022,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "render_to_response",
          "type": "function_definition",
          "line_start": 1024,
          "line_end": 1037,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 1043,
          "line_end": 1044,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        },
        {
          "name": "task_chosen",
          "type": "function_definition",
          "line_start": 1047,
          "line_end": 1049,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0932,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 76,
        "avg_function_length": 9.14,
        "function_length_stddev": 7.85,
        "import_count": 34,
        "export_count": 0,
        "comment_lines": 59,
        "code_lines": 991,
        "comment_ratio": 0.0562,
        "comment_what_ratio": 0.325,
        "naming_avg_length": 8.64,
        "debug_artifacts": [],
        "ai_smell_count": 36,
        "ai_smell_density": 0.036327,
        "structural_uniformity": 0.1411,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.79,
        "mechanical": 88.79,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\auto_height_text.py",
      "language": "python",
      "line_count": 21,
      "token_estimate": 151,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 17,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2188,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 16,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 19,
        "comment_ratio": 0.0952,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.9,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.052632,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 79.54,
        "mechanical": 79.54,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\widgets\\tags.py",
      "language": "python",
      "line_count": 90,
      "token_estimate": 790,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0101,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 37,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 29,
              "description": "Function is 61 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 30 dynamic threshold)",
                "impact": "Function get_context is 61 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1249,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 36.5,
        "function_length_stddev": 34.65,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 87,
        "comment_ratio": 0.0333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.96,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.022989,
        "structural_uniformity": 0.0507,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.8,
        "mechanical": 75.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\router.py",
      "language": "python",
      "line_count": 96,
      "token_estimate": 722,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 16,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 16,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_endpoint",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 18,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 18,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 19,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 19,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model_endpoint",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 21,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 21,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 23,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 23,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 25,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 25,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 26,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 26,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 28,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 28,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 28,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_model_listing_urlpath",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 37,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 37,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 39,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 39,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 41,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 41,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 42,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 42,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 43,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 43,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 44,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 44,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_object_detail_urlpath",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 53,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 53,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 55,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 55,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 57,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 57,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 58,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 58,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 59,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 59,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 60,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 60,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "wrap_view",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0925,
          "ai_signals": []
        },
        {
          "name": "get_urlpatterns",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 75,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 75,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 75,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4425,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "urls",
          "type": "decorated_definition",
          "line_start": 86,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0925,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 8,
        "avg_function_length": 9.38,
        "function_length_stddev": 5.04,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 29,
        "code_lines": 67,
        "comment_ratio": 0.3021,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.63,
        "debug_artifacts": [],
        "ai_smell_count": 44,
        "ai_smell_density": 0.656716,
        "structural_uniformity": 0.4623,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.56,
        "mechanical": 71.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\api\\v2\\tests\\tests.py",
      "language": "python",
      "line_count": 402,
      "token_estimate": 3174,
      "functions": [
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "__bytes__",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "decode",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "prepare_site",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "clear_cached_site",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_get_base_url_unset",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_get_base_url_from_request",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_get_base_url_prefers_setting",
          "type": "decorated_definition",
          "line_start": 67,
          "line_end": 74,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILAPI_BASE_URL=\"https://bar.example.com\")"
          ]
        },
        {
          "name": "test_get_base_url_from_setting_string",
          "type": "decorated_definition",
          "line_start": 76,
          "line_end": 78,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILAPI_BASE_URL=\"https://bar.example.com\")"
          ]
        },
        {
          "name": "test_get_base_url_from_setting_bytes",
          "type": "decorated_definition",
          "line_start": 80,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILAPI_BASE_URL=b\"https://baz.example.com\")"
          ]
        },
        {
          "name": "test_get_base_url_from_setting_object",
          "type": "decorated_definition",
          "line_start": 84,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILAPI_BASE_URL=DynamicBaseUrl())"
          ]
        },
        {
          "name": "test_valid_single_field",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_multiple_fields",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_negated_field",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_nested_fields",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_star_field",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_star_with_additional_field",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_underscore_field",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_field_with_underscore_in_middle",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_negated_field_with_underscore_in_middle",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_field_with_underscore_at_beginning",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 208,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_field_with_underscore_at_end",
          "type": "function_definition",
          "line_start": 210,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_char",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 226,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_whitespace_before_identifier",
          "type": "function_definition",
          "line_start": 228,
          "line_end": 232,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_whitespace_after_identifier",
          "type": "function_definition",
          "line_start": 234,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_whitespace_after_comma",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_whitespace_before_comma",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 250,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unexpected_negation_operator",
          "type": "function_definition",
          "line_start": 252,
          "line_end": 256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unexpected_open_bracket",
          "type": "function_definition",
          "line_start": 258,
          "line_end": 262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unexpected_close_bracket",
          "type": "function_definition",
          "line_start": 264,
          "line_end": 268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unexpected_comma_in_middle",
          "type": "function_definition",
          "line_start": 270,
          "line_end": 274,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unexpected_comma_at_end",
          "type": "function_definition",
          "line_start": 276,
          "line_end": 280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_unclosed_bracket",
          "type": "function_definition",
          "line_start": 282,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_subfields_on_negated_field",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_field_in_wrong_position",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_negated_star",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_with_nesting",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_with_chars_after",
          "type": "function_definition",
          "line_start": 315,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_with_chars_before",
          "type": "function_definition",
          "line_start": 321,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_with_additional_field",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_underscore_in_wrong_position",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_negated_underscore",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_underscore_with_nesting",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 351,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_underscore_with_negated_field",
          "type": "function_definition",
          "line_start": 353,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_star_and_underscore",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 363,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_true",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_false",
          "type": "function_definition",
          "line_start": 374,
          "line_end": 377,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_1",
          "type": "function_definition",
          "line_start": 379,
          "line_end": 382,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_valid_0",
          "type": "function_definition",
          "line_start": 384,
          "line_end": 387,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        },
        {
          "name": "test_invalid_integer",
          "type": "function_definition",
          "line_start": 397,
          "line_end": 401,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0735,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 52,
        "avg_function_length": 6.19,
        "function_length_stddev": 3.92,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 393,
        "comment_ratio": 0.0224,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.14,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3676,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.56,
        "mechanical": 98.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\definition_lookup.py",
      "language": "python",
      "line_count": 86,
      "token_estimate": 818,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0808,
          "ai_signals": []
        },
        {
          "name": "get_block",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 43,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4308,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0808,
          "ai_signals": []
        },
        {
          "name": "add_block",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 74,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2867,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "get_lookup_as_dict",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0808,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 8.2,
        "function_length_stddev": 6.06,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 41,
        "code_lines": 45,
        "comment_ratio": 0.4767,
        "comment_what_ratio": 0.1429,
        "naming_avg_length": 7.02,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.044444,
        "structural_uniformity": 0.2612,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.09,
        "mechanical": 86.09,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\blocks\\stream_block.py",
      "language": "python",
      "line_count": 884,
      "token_estimate": 8238,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 56,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.145,
          "ai_signals": []
        },
        {
          "name": "as_json_data",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 75,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 69,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 90,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3117,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "construct_from_lookup",
          "type": "decorated_definition",
          "line_start": 92,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "empty_value",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "sorted_child_blocks",
          "type": "function_definition",
          "line_start": 103,
          "line_end": 107,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "grouped_child_blocks",
          "type": "function_definition",
          "line_start": 109,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "value_from_datadict",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 3,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 119,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 120,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 122,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 123,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 125,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 128,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 133,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 136,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 138,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "value_omitted_from_data",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 156,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 157,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "required",
          "type": "decorated_definition",
          "line_start": 159,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "defer_required_validation",
          "type": "function_definition",
          "line_start": 163,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 165,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 238,
          "metrics": {
            "cyclomatic_complexity": 11,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 71,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 178,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 202,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 205,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 214,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 224,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 168,
              "description": "Function is 71 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 71 lines (> 15 dynamic threshold)",
                "impact": "Function clean is 71 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3158,
          "ai_signals": [
            "High anti-pattern density (0.85)"
          ]
        },
        {
          "name": "restore_deferred_validation",
          "type": "function_definition",
          "line_start": 240,
          "line_end": 243,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 241,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "to_python",
          "type": "function_definition",
          "line_start": 245,
          "line_end": 297,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 251,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 283,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 245,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function to_python is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2181,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "bulk_to_python",
          "type": "function_definition",
          "line_start": 299,
          "line_end": 346,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 311,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 313,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 299,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function bulk_to_python is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2388,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 348,
          "line_end": 357,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "normalize",
          "type": "function_definition",
          "line_start": 359,
          "line_end": 360,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_form_state",
          "type": "function_definition",
          "line_start": 362,
          "line_end": 373,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 375,
          "line_end": 389,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "render_basic",
          "type": "function_definition",
          "line_start": 391,
          "line_end": 396,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "get_searchable_content",
          "type": "function_definition",
          "line_start": 398,
          "line_end": 406,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 403,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "extract_references",
          "type": "function_definition",
          "line_start": 408,
          "line_end": 424,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 409,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2259,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "get_block_by_content_path",
          "type": "function_definition",
          "line_start": 426,
          "line_end": 440,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 433,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2533,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "deconstruct",
          "type": "function_definition",
          "line_start": 442,
          "line_end": 454,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "deconstruct_with_lookup",
          "type": "function_definition",
          "line_start": 456,
          "line_end": 465,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "check",
          "type": "function_definition",
          "line_start": 467,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 469,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_has_default",
          "type": "decorated_definition",
          "line_start": 475,
          "line_end": 477,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 521,
          "line_end": 523,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "block_type",
          "type": "decorated_definition",
          "line_start": 525,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 540,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "_as_tuple",
          "type": "function_definition",
          "line_start": 542,
          "line_end": 546,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 557,
          "line_end": 558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 560,
          "line_end": 567,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 569,
          "line_end": 570,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__setitem__",
          "type": "function_definition",
          "line_start": 572,
          "line_end": 575,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__delitem__",
          "type": "function_definition",
          "line_start": 577,
          "line_end": 579,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "insert",
          "type": "function_definition",
          "line_start": 581,
          "line_end": 583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 581,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 581,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 582,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 582,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 583,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 583,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 585,
          "line_end": 586,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 595,
          "line_end": 600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 602,
          "line_end": 625,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 609,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1658,
          "ai_signals": []
        },
        {
          "name": "__iter__",
          "type": "function_definition",
          "line_start": 627,
          "line_end": 628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 630,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 633,
          "line_end": 670,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 633,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function __init__ is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1121,
          "ai_signals": []
        },
        {
          "name": "_construct_stream_child",
          "type": "function_definition",
          "line_start": 672,
          "line_end": 689,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 682,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2144,
          "ai_signals": [
            "High anti-pattern density (0.56)"
          ]
        },
        {
          "name": "__getitem__",
          "type": "function_definition",
          "line_start": 691,
          "line_end": 700,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__setitem__",
          "type": "function_definition",
          "line_start": 702,
          "line_end": 703,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__delitem__",
          "type": "function_definition",
          "line_start": 705,
          "line_end": 707,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "insert",
          "type": "function_definition",
          "line_start": 709,
          "line_end": 711,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 709,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 709,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 710,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 710,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 711,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_no_error_retry",
              "severity": "medium",
              "line": 711,
              "description": "Vector DB API call without retry logic -- transient network errors cause data loss or failed queries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "raw_data",
          "type": "decorated_definition",
          "line_start": 713,
          "line_end": 715,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "_prefetch_blocks",
          "type": "function_definition",
          "line_start": 717,
          "line_end": 741,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "gemini_batch_no_error_handling",
              "severity": "medium",
              "line": 723,
              "description": "Gemini batch request without per-item error handling",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 738,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "get_prep_value",
          "type": "function_definition",
          "line_start": 743,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 746,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1867,
          "ai_signals": []
        },
        {
          "name": "blocks_by_name",
          "type": "function_definition",
          "line_start": 765,
          "line_end": 770,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "first_block_by_name",
          "type": "function_definition",
          "line_start": 772,
          "line_end": 777,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 779,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 784,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1867,
          "ai_signals": []
        },
        {
          "name": "__len__",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 804,
          "line_end": 805,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "render_as_block",
          "type": "function_definition",
          "line_start": 807,
          "line_end": 808,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 810,
          "line_end": 811,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 813,
          "line_end": 814,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.02,
          "ai_signals": []
        },
        {
          "name": "_deserialize_pickle_value",
          "type": "decorated_definition",
          "line_start": 816,
          "line_end": 820,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 817,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 819,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "__reduce__",
          "type": "function_definition",
          "line_start": 822,
          "line_end": 838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 825,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 833,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "js_args",
          "type": "function_definition",
          "line_start": 844,
          "line_end": 872,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 846,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 850,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2614,
          "ai_signals": [
            "High anti-pattern density (0.69)"
          ]
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 874,
          "line_end": 880,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 878,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.37,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "cached_property"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 63,
        "avg_function_length": 11.4,
        "function_length_stddev": 13.63,
        "import_count": 16,
        "export_count": 4,
        "comment_lines": 149,
        "code_lines": 735,
        "comment_ratio": 0.1686,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 7.08,
        "debug_artifacts": [],
        "ai_smell_count": 58,
        "ai_smell_density": 0.078912,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.15,
        "mechanical": 75.15,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 34,
      "token_estimate": 231,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 34,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.14,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\forms\\wagtail_hooks.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 219,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0922,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0922,
          "ai_signals": []
        },
        {
          "name": "register_forms_menu_item",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0922,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5.67,
        "function_length_stddev": 3.06,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 31,
        "comment_ratio": 0.0312,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4609,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\frontend_cache\\backends\\dummy.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 51,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 5,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        },
        {
          "name": "purge",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1057,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 3,
        "function_length_stddev": 1.41,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 12,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 5.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5286,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\legacy\\richtext\\tests\\test_templatetag.py",
      "language": "python",
      "line_count": 15,
      "token_estimate": 125,
      "functions": [
        {
          "name": "test_no_contrib_legacy_richtext_no_wrapper",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0788,
          "ai_signals": []
        },
        {
          "name": "test_contrib_legacy_richtext_renders_wrapper",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0788,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 3.5,
        "function_length_stddev": 2.12,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 15,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3939,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.5,
        "mechanical": 98.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\migrations\\0005_capitalizeverbose.py",
      "language": "python",
      "line_count": 60,
      "token_estimate": 467,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 60,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\redirects\\tests\\test_signal_handlers.py",
      "language": "python",
      "line_count": 242,
      "token_estimate": 2251,
      "functions": [
        {
          "name": "setUpTestData",
          "type": "decorated_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "trigger_page_slug_changed_signal",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "test_golden_path",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 76,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 84,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2057,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_no_redirects_created_when_page_is_root_for_all_sites_it_belongs_to",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "test_handling_of_existing_redirects",
          "type": "function_definition",
          "line_start": 106,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 130,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 130,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 106,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_handling_of_existing_redirects is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1903,
          "ai_signals": []
        },
        {
          "name": "test_redirect_creation_for_custom_route_paths",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 168,
              "description": "Function is 43 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 22 dynamic threshold)",
                "impact": "Function test_redirect_creation_for_custom_route_paths is 43 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0996,
          "ai_signals": []
        },
        {
          "name": "test_no_redirects_created_when_pages_are_moved_to_a_different_site",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": []
        },
        {
          "name": "test_no_redirects_created_if_disabled",
          "type": "decorated_definition",
          "line_start": 236,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0182,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAILREDIRECTS_AUTO_CREATE=False)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 23.11,
        "function_length_stddev": 23.87,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 22,
        "code_lines": 220,
        "comment_ratio": 0.0909,
        "comment_what_ratio": 0.0909,
        "naming_avg_length": 7.76,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.031818,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.67,
        "mechanical": 84.67,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\routable_page\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 65,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\forms.py",
      "language": "python",
      "line_count": 140,
      "token_estimate": 1205,
      "functions": [
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 40,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 40,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function clean is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0958,
          "ai_signals": []
        },
        {
          "name": "add_fields",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0125,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 129,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2313,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 15.2,
        "function_length_stddev": 15.74,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 124,
        "comment_ratio": 0.1143,
        "comment_what_ratio": 0.0625,
        "naming_avg_length": 7.32,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.016129,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.91,
        "mechanical": 87.91,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\migrations\\0005_switch_query_model.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 149,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\search_promotions\\templates\\wagtailsearchpromotions\\queries\\chooser_field.js",
      "language": "javascript",
      "line_count": 19,
      "token_estimate": 115,
      "functions": [
        {
          "name": "createQueryChooser",
          "type": "function_declaration",
          "line_start": 1,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 2,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 2 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 3,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 3 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            },
            {
              "id": "var-declaration",
              "severity": "medium",
              "line": 6,
              "description": "Using 'var' instead of 'const' or 'let'",
              "fix_type": "deterministic",
              "evidence": {
                "detection_method": "ast-grep-pattern",
                "proof": "Using 'var' instead of 'const' or 'let'",
                "impact": "var declaration at line 6 has function scope instead of block scope, risking bugs",
                "recommendation": "Replace var with const (if not reassigned) or let",
                "confidence": 1.0,
                "fix_type": "deterministic",
                "references": [
                  "https://eslint.org/docs/latest/rules/no-var"
                ]
              }
            }
          ],
          "ai_confidence": 0.3575,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 18,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 19,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.45,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.157895,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.6,
        "mechanical": 72.6,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\templatetags\\wagtailsettings_tags.py",
      "language": "python",
      "line_count": 41,
      "token_estimate": 335,
      "functions": [
        {
          "name": "get_settings_object",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0919,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0919,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0919,
          "ai_signals": []
        },
        {
          "name": "get_settings",
          "type": "decorated_definition",
          "line_start": 32,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0919,
          "ai_signals": [],
          "decorators": [
            "register.tag"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 6.5,
        "function_length_stddev": 3.51,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 39,
        "comment_ratio": 0.0488,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.98,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.4597,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\tests\\shared\\test_preview.py",
      "language": "python",
      "line_count": 263,
      "token_estimate": 2609,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 34,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 40,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4293,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_preview_on_edit_with_valid_then_invalid_data",
          "type": "function_definition",
          "line_start": 47,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 53,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 61,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 73,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 74,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 47,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function test_preview_on_edit_with_valid_then_invalid_data is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4993,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_preview_on_edit_clear_preview_data",
          "type": "function_definition",
          "line_start": 93,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 105,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 116,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 127,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4493,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_preview_on_edit_without_permission",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 134,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4186,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_preview_on_edit_get_without_permission",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 148,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4186,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "test_big_preview_with_signed_cookies",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 169,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 187,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3681,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ],
          "decorators": [
            "override_settings(SESSION_ENGINE=\"django.contrib.sessions.backends.signed_cookies\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 199,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1493,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 216,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1493,
          "ai_signals": []
        },
        {
          "name": "test_show_preview_panel_on_edit",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 227,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 235,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 218,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_preview_panel_on_edit is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4054,
          "ai_signals": [
            "High anti-pattern density (0.73)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 24.56,
        "function_length_stddev": 14.41,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 236,
        "comment_ratio": 0.1027,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.42,
        "debug_artifacts": [],
        "ai_smell_count": 17,
        "ai_smell_density": 0.072034,
        "structural_uniformity": 0.4133,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.62,
        "mechanical": 77.62,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\settings\\views.py",
      "language": "python",
      "line_count": 230,
      "token_estimate": 2019,
      "functions": [
        {
          "name": "get_model_from_url_params",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_setting_edit_handler",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 50,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 50,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "redirect_to_relevant_instance",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 46,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 53,
              "description": "Function is 46 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 46 lines (> 30 dynamic threshold)",
                "impact": "Function redirect_to_relevant_instance is 46 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.0761,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 108,
          "line_end": 115,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "run_before_hook",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "run_after_hook",
          "type": "function_definition",
          "line_start": 120,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_header_icon",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 138,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_panel",
          "type": "function_definition",
          "line_start": 140,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 143,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_buttons",
          "type": "function_definition",
          "line_start": 149,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_page_subtitle",
          "type": "function_definition",
          "line_start": 152,
          "line_end": 153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 155,
          "line_end": 175,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_url",
          "type": "function_definition",
          "line_start": 177,
          "line_end": 178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 180,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_preview_url",
          "type": "function_definition",
          "line_start": 186,
          "line_end": 191,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_side_panels",
          "type": "function_definition",
          "line_start": 193,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "setup",
          "type": "function_definition",
          "line_start": 204,
          "line_end": 210,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_object",
          "type": "function_definition",
          "line_start": 212,
          "line_end": 223,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_extra_request_attrs",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 8.65,
        "function_length_stddev": 10.17,
        "import_count": 17,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 220,
        "comment_ratio": 0.0435,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.07,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.013636,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.32,
        "mechanical": 93.32,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\sitemaps\\apps.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 60,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 9,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.83,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\styleguide\\tests.py",
      "language": "python",
      "line_count": 59,
      "token_estimate": 501,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "test_styleguide",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 16,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 20,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_icons",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 16,
        "function_length_stddev": 16.37,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 56,
        "comment_ratio": 0.0508,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.035714,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.27,
        "mechanical": 88.27,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\contrib\\table_block\\templatetags\\table_block_tags.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 333,
      "functions": [
        {
          "name": "cell_classname",
          "type": "decorated_definition",
          "line_start": 7,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1476,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.74)"
          ],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "cell_hidden",
          "type": "decorated_definition",
          "line_start": 20,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1476,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.74)"
          ],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        },
        {
          "name": "cell_span",
          "type": "decorated_definition",
          "line_start": 31,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1476,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.74)"
          ],
          "decorators": [
            "register.simple_tag(takes_context=True)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 11.67,
        "function_length_stddev": 3.06,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 46,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.7381,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.5,
        "mechanical": 99.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\admin.py",
      "language": "python",
      "line_count": 16,
      "token_estimate": 114,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 13,
        "comment_ratio": 0.1875,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\apps.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 214,
      "functions": [
        {
          "name": "ready",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 29,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 29,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 29,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 29,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 29,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 29,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 29,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3597,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 16,
        "function_length_stddev": 0.0,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 30,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.58,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.3,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.2,
        "mechanical": 73.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0004_capitalizeverbose.py",
      "language": "python",
      "line_count": 56,
      "token_estimate": 414,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 56,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\migrations\\0011_add_choose_permissions.py",
      "language": "python",
      "line_count": 103,
      "token_estimate": 927,
      "functions": [
        {
          "name": "add_choose_permission_to_admin_groups",
          "type": "function_definition",
          "line_start": 6,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 7,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 7,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 8,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 8,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 9,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 9,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 13,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 26,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 27,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_choose_permission",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 32,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 32,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 33,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 33,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 36,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_choose_permission",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 46,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 46,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 50,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "copy_choose_permission_to_collections",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 58,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 58,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 59,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 59,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 60,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 60,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 66,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_choose_permission_from_collections",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 73,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 73,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5388,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 12.6,
        "function_length_stddev": 6.11,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 95,
        "comment_ratio": 0.0777,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 9.85,
        "debug_artifacts": [],
        "ai_smell_count": 28,
        "ai_smell_density": 0.294737,
        "structural_uniformity": 0.5153,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 69.82,
        "mechanical": 69.82,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\rich_text\\contentstate.py",
      "language": "python",
      "line_count": 59,
      "token_estimate": 363,
      "functions": [
        {
          "name": "document_link_entity",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1823,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.91)"
          ]
        },
        {
          "name": "get_attribute_data",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 35,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 35,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 38,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5323,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.91)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 16,
        "function_length_stddev": 1.41,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 47,
        "comment_ratio": 0.2034,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.34,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.06383,
        "structural_uniformity": 0.9116,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.74,
        "mechanical": 80.74,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_bulk_actions\\test_bulk_add_tags.py",
      "language": "python",
      "line_count": 84,
      "token_estimate": 661,
      "functions": [
        {
          "name": "get_tag_list",
          "type": "function_definition",
          "line_start": 11,
          "line_end": 12,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0479,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "cohere_document_no_id",
              "severity": "medium",
              "line": 19,
              "description": "RAG documents without unique IDs \u2014 can't track citations",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3979,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_tags_with_limited_permissions",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 41,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 49,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 54,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 60,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 62,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3979,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 69,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3979,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_add_tags",
          "type": "function_definition",
          "line_start": 72,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 82,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3979,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 13.4,
        "function_length_stddev": 10.19,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 80,
        "comment_ratio": 0.0476,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.91,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.2397,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.18,
        "mechanical": 70.18,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\tests\\test_rich_text.py",
      "language": "python",
      "line_count": 77,
      "token_estimate": 726,
      "functions": [
        {
          "name": "test_get_db_attributes",
          "type": "function_definition",
          "line_start": 19,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_editor_preserves_id_of_nonexistent_document",
          "type": "function_definition",
          "line_start": 32,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 32,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 32,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.466,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_expand_db_attributes_for_editor_with_missing_id",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 38,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_for_frontend",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_document_does_not_exist",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_expand_db_attributes_with_missing_id",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 63,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 63,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.466,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_chooser_urls_exist",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.116,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 4.89,
        "function_length_stddev": 2.57,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 77,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.27,
        "debug_artifacts": [],
        "ai_smell_count": 4,
        "ai_smell_density": 0.051948,
        "structural_uniformity": 0.4741,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 87.01,
        "mechanical": 87.01,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\bulk_actions\\__init__.py",
      "language": "python",
      "line_count": 6,
      "token_estimate": 54,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 3,
        "comment_lines": 0,
        "code_lines": 6,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 15.4,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\documents\\views\\serve.py",
      "language": "python",
      "line_count": 151,
      "token_estimate": 1502,
      "functions": [
        {
          "name": "document_etag",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 22,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3704,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "serve",
          "type": "decorated_definition",
          "line_start": 28,
          "line_end": 114,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 87,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 29,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 29,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 29,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 29,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 30,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 30,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_raw_text_as_id",
              "severity": "medium",
              "line": 31,
              "description": "Using raw text content as vector ID -- IDs with spaces/special chars cause API errors and collisions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 39,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 39,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 39,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 44,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 44,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 45,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 45,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 49,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 54,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 57,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 57,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 59,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 59,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 62,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 62,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 64,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 64,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 66,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 66,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 68,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 68,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 71,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 71,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 78,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 78,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 28,
              "description": "Function is 87 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 87 lines (> 37 dynamic threshold)",
                "impact": "Function serve is 87 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3704,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "etag(document_etag)"
          ]
        },
        {
          "name": "authenticate_with_password",
          "type": "function_definition",
          "line_start": 117,
          "line_end": 150,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0204,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 43,
        "function_length_stddev": 40.26,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 30,
        "code_lines": 121,
        "comment_ratio": 0.1987,
        "comment_what_ratio": 0.0385,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 39,
        "ai_smell_density": 0.322314,
        "structural_uniformity": 0.0637,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 57.77,
        "mechanical": 57.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\finders\\__init__.py",
      "language": "python",
      "line_count": 49,
      "token_estimate": 334,
      "functions": [
        {
          "name": "import_finder_class",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 19,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 22,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4979,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.74)"
          ]
        },
        {
          "name": "_get_config_from_settings",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1479,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.74)"
          ]
        },
        {
          "name": "get_finders",
          "type": "decorated_definition",
          "line_start": 38,
          "line_end": 48,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4661,
          "ai_signals": [
            "High anti-pattern density (0.91)",
            "Suspiciously uniform function lengths (0.74)"
          ],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 12.33,
        "function_length_stddev": 3.21,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 41,
        "comment_ratio": 0.1633,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.77,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.073171,
        "structural_uniformity": 0.7394,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 77.17,
        "mechanical": 77.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 52,
      "token_estimate": 446,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 52,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.89,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\migrations\\0009_embed_cache_until.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 104,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.73,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\static_src\\wagtailembeds\\js\\embed-chooser-modal.js",
      "language": "javascript",
      "line_count": 24,
      "token_estimate": 147,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.68,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\embeds\\views\\chooser.py",
      "language": "python",
      "line_count": 90,
      "token_estimate": 768,
      "functions": [
        {
          "name": "chooser",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 19,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "chooser_upload",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 1,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "vertex_model_no_labels",
              "severity": "low",
              "line": 30,
              "description": "Vertex model deployed without labels \u2014 hard to track costs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 32,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 58,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 62,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 64,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 81,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 30,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function chooser_upload is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 35,
        "function_length_stddev": 35.36,
        "import_count": 8,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 90,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.82,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.088889,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 62.03,
        "mechanical": 62.03,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\admin_urls.py",
      "language": "python",
      "line_count": 42,
      "token_estimate": 397,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 42,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.54,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\api\\v2\\views.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 200,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 24,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 11.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\formats.py",
      "language": "python",
      "line_count": 109,
      "token_estimate": 758,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 10,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 10,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 12,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 18,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__repr__",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "editor_attributes",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 30,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.3939,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "image_to_editor_html",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "image_to_html",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "register_image_format",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "unregister_image_format",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 2
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 69,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 75,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4257,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_image_formats",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "get_image_format",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 86,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        },
        {
          "name": "search_for_image_formats",
          "type": "function_definition",
          "line_start": 92,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0757,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 11,
        "avg_function_length": 5.91,
        "function_length_stddev": 3.67,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 103,
        "comment_ratio": 0.055,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.15,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.058252,
        "structural_uniformity": 0.3784,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.44,
        "mechanical": 83.44,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0001_squashed_0021.py",
      "language": "python",
      "line_count": 270,
      "token_estimate": 2560,
      "functions": [
        {
          "name": "add_image_permissions_to_admin_groups",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 16,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 16,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 17,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 22,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 26,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 31,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 36,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 42,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5027,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_image_permissions",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 50,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 50,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 51,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 51,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 54,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 58,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5027,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_image_permissions",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 68,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 68,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 69,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 69,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 73,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 76,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5027,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "copy_image_permissions_to_collections",
          "type": "function_definition",
          "line_start": 80,
          "line_end": 91,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 81,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 81,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 82,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 82,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 83,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 83,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 87,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 88,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5027,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "remove_image_permissions_from_collections",
          "type": "function_definition",
          "line_start": 94,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 95,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 95,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5027,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 14.6,
        "function_length_stddev": 9.71,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 262,
        "comment_ratio": 0.0296,
        "comment_what_ratio": 0.4286,
        "naming_avg_length": 9.22,
        "debug_artifacts": [],
        "ai_smell_count": 33,
        "ai_smell_density": 0.125954,
        "structural_uniformity": 0.3349,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.32,
        "mechanical": 70.32,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0009_capitalizeverbose.py",
      "language": "python",
      "line_count": 71,
      "token_estimate": 524,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 71,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0017_reduce_focal_point_key_max_length.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 207,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 19,
        "comment_ratio": 0.2083,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.52,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\migrations\\0025_alter_image_file_alter_rendition_file.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 259,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 36,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.9,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\rich_text\\contentstate.py",
      "language": "python",
      "line_count": 67,
      "token_estimate": 475,
      "functions": [
        {
          "name": "image_entity",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 30,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 19,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "ollama_wrong_format_param",
              "severity": "medium",
              "line": 19,
              "description": "Ollama format parameter set to non-json string -- only 'json' is supported, other values are silently ignored",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 25,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.5096,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        },
        {
          "name": "create_entity",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 40,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 40,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5096,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Suspiciously uniform function lengths (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 17.5,
        "function_length_stddev": 3.54,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 12,
        "code_lines": 55,
        "comment_ratio": 0.1791,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.38,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.090909,
        "structural_uniformity": 0.798,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.52,
        "mechanical": 73.52,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\static_src\\wagtailimages\\js\\vendor\\jquery.fileupload-validate.js",
      "language": "javascript",
      "line_count": 120,
      "token_estimate": 1016,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 0,
        "export_count": 0,
        "comment_lines": 33,
        "code_lines": 87,
        "comment_ratio": 0.275,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.69,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_blocks.py",
      "language": "python",
      "line_count": 556,
      "token_estimate": 4728,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 42,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 37,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4772,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_render_with_custom_default_attrs",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 55,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 54,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4189,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_render_missing",
          "type": "function_definition",
          "line_start": 57,
          "line_end": 64,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 61,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4772,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_deconstruct",
          "type": "function_definition",
          "line_start": 66,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 82,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 99,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 101,
          "line_end": 133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 126,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2333,
          "ai_signals": []
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 135,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 160,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2366,
          "ai_signals": []
        },
        {
          "name": "test_render",
          "type": "function_definition",
          "line_start": 170,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_render_basic",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_render_as_decorative",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_no_alt_text",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_to_python_with_int",
          "type": "function_definition",
          "line_start": 243,
          "line_end": 249,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_to_python_with_dict",
          "type": "function_definition",
          "line_start": 251,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 257,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4772,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_to_python_with_none",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_with_empty_list",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 270,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_with_list_of_none",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 275,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_with_list_of_ints",
          "type": "function_definition",
          "line_start": 277,
          "line_end": 281,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_bulk_to_python_with_list_of_dicts",
          "type": "function_definition",
          "line_start": 283,
          "line_end": 307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 305,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 307,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4072,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        },
        {
          "name": "test_get_prep_value",
          "type": "function_definition",
          "line_start": 309,
          "line_end": 323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_get_prep_value_for_null_value",
          "type": "function_definition",
          "line_start": 325,
          "line_end": 332,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_get_searchable_content",
          "type": "function_definition",
          "line_start": 334,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_required_true",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_required_false",
          "type": "function_definition",
          "line_start": 369,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_get_block_by_content_path",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 393,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.2439,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 432,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1272,
          "ai_signals": []
        },
        {
          "name": "test_hasnt_changed",
          "type": "function_definition",
          "line_start": 434,
          "line_end": 473,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 440,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 452,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 466,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 434,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_hasnt_changed is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4772,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_has_changed",
          "type": "function_definition",
          "line_start": 475,
          "line_end": 513,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 481,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 493,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 507,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 475,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_has_changed is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4772,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_alt_text_has_changed",
          "type": "function_definition",
          "line_start": 515,
          "line_end": 555,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 521,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 533,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 547,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 515,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_alt_text_has_changed is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4687,
          "ai_signals": [
            "High anti-pattern density (0.98)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 30,
        "avg_function_length": 16.43,
        "function_length_stddev": 11.46,
        "import_count": 12,
        "export_count": 0,
        "comment_lines": 15,
        "code_lines": 541,
        "comment_ratio": 0.027,
        "comment_what_ratio": 0.3333,
        "naming_avg_length": 7.51,
        "debug_artifacts": [],
        "ai_smell_count": 21,
        "ai_smell_density": 0.038817,
        "structural_uniformity": 0.3028,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.07,
        "mechanical": 88.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_jinja2_svg.py",
      "language": "python",
      "line_count": 242,
      "token_estimate": 2244,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.3196,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.3196,
          "ai_signals": [
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_image_with_raster_image",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 42,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 42,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 50,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_image_with_svg_without_preserve",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 58,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 53,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 53,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 53,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 53,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 54,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 54,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_image_with_svg_with_preserve",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 71,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 60,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 60,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 60,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 60,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 61,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 61,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 63,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 63,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 70,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_raster_image_with_preserve_svg",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 84,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 73,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 73,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 74,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 74,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 76,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 76,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 83,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_srcset_image_with_svg_preserve",
          "type": "function_definition",
          "line_start": 86,
          "line_end": 102,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 86,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 86,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 86,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 86,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 87,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 87,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 89,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 89,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 99,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_raster_srcset_image_with_preserve_svg",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 104,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 104,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 105,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 105,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 107,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 107,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 121,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_with_svg_preserve",
          "type": "function_definition",
          "line_start": 126,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 126,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 126,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 126,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 126,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 127,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 127,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 129,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 129,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 137,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_raster_picture_with_preserve_svg",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 163,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 142,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 142,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 143,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 143,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 145,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 145,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 159,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 160,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_preserve_svg_with_multiple_operations",
          "type": "function_definition",
          "line_start": 165,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 165,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 165,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 166,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 166,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 168,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 168,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 176,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_preserve_svg_with_custom_attributes",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 179,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 179,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 180,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 180,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 182,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 182,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 189,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_with_multiple_formats_and_sizes_with_raster_image",
          "type": "function_definition",
          "line_start": 192,
          "line_end": 217,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 201,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 201,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 206,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 212,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 213,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        },
        {
          "name": "test_picture_with_multiple_formats_and_sizes_with_svg_image",
          "type": "function_definition",
          "line_start": 219,
          "line_end": 241,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 226,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 226,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 236,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            },
            {
              "id": "stability_invalid_dimensions",
              "severity": "medium",
              "line": 237,
              "description": "Image dimensions not valid for Stability engine -- API will reject or produce artifacts",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.6696,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 15.21,
        "function_length_stddev": 6.12,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 47,
        "code_lines": 195,
        "comment_ratio": 0.1942,
        "comment_what_ratio": 1.0,
        "naming_avg_length": 7.05,
        "debug_artifacts": [],
        "ai_smell_count": 81,
        "ai_smell_density": 0.415385,
        "structural_uniformity": 0.598,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 72.83,
        "mechanical": 72.83,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\tests\\test_transform.py",
      "language": "python",
      "line_count": 61,
      "token_estimate": 454,
      "functions": [
        {
          "name": "test_resize",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1908,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.95)"
          ]
        },
        {
          "name": "test_crop",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1908,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.95)"
          ]
        },
        {
          "name": "test_resize_then_crop",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1908,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.95)"
          ]
        },
        {
          "name": "test_crop_then_resize",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1908,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.95)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 12.5,
        "function_length_stddev": 0.58,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 61,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.9538,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 99.25,
        "mechanical": 99.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\views\\bulk_actions\\add_tags.py",
      "language": "python",
      "line_count": 45,
      "token_estimate": 378,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0862,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0862,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 29,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 34,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 36,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4362,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 44,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 39,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4362,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.25,
        "function_length_stddev": 2.99,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 45,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.53,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.066667,
        "structural_uniformity": 0.4312,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 83.33,
        "mechanical": 83.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\images\\wagtail_hooks.py",
      "language": "python",
      "line_count": 201,
      "token_estimate": 1689,
      "functions": [
        {
          "name": "register_admin_urls",
          "type": "decorated_definition",
          "line_start": 30,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_urls\")"
          ]
        },
        {
          "name": "construct_admin_api",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 39,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 39,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.371,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"construct_admin_api\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": []
        },
        {
          "name": "register_images_menu_item",
          "type": "decorated_definition",
          "line_start": 49,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_menu_item\")"
          ]
        },
        {
          "name": "register_image_feature",
          "type": "decorated_definition",
          "line_start": 60,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 62,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 92,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 60,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function register_image_feature is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2543,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "register_image_operations",
          "type": "decorated_definition",
          "line_start": 107,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_image_operations\")"
          ]
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": []
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": []
        },
        {
          "name": "add_images_summary_item",
          "type": "decorated_definition",
          "line_start": 145,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"construct_homepage_summary_items\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": []
        },
        {
          "name": "register_images_search_area",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_search_area\")"
          ]
        },
        {
          "name": "register_image_permissions_panel",
          "type": "decorated_definition",
          "line_start": 168,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_group_permission_panel\")"
          ]
        },
        {
          "name": "describe_collection_docs",
          "type": "decorated_definition",
          "line_start": 173,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 175,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 175,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.371,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"describe_collection_contents\")"
          ]
        },
        {
          "name": "register_image_chooser_viewset",
          "type": "decorated_definition",
          "line_start": 198,
          "line_end": 200,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.021,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 9.14,
        "function_length_stddev": 11.04,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 10,
        "code_lines": 191,
        "comment_ratio": 0.0498,
        "comment_what_ratio": 0.1,
        "naming_avg_length": 10.06,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.036649,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 90.84,
        "mechanical": 90.84,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\locales\\views.py",
      "language": "python",
      "line_count": 155,
      "token_estimate": 1245,
      "functions": [
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "_can_add_locale",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "get_value",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 45,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "get_add_url",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "dispatch",
          "type": "function_definition",
          "line_start": 76,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "can_delete",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "get_context_data",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 117,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "form_valid",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 124,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "get_common_view_kwargs",
          "type": "function_definition",
          "line_start": 144,
          "line_end": 151,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        },
        {
          "name": "get_form_class",
          "type": "function_definition",
          "line_start": 153,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0783,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 10,
        "avg_function_length": 6.4,
        "function_length_stddev": 3.89,
        "import_count": 13,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 151,
        "comment_ratio": 0.0258,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.3,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.3917,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.0,
        "mechanical": 97.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\fixtree.py",
      "language": "python",
      "line_count": 166,
      "token_estimate": 1696,
      "functions": [
        {
          "name": "add_arguments",
          "type": "function_definition",
          "line_start": 15,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "numberlist_to_string",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0375,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 36,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 49,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 49,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 50,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 50,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3875,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "handle_model",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 165,
          "metrics": {
            "cyclomatic_complexity": 16,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 114,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 52,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 93,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 52,
              "description": "Function is 114 lines (> 15 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 114 lines (> 15 dynamic threshold)",
                "impact": "Function handle_model is 114 lines \u2014 exceeds 15 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1603,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 37,
        "function_length_stddev": 51.59,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 16,
        "code_lines": 150,
        "comment_ratio": 0.0964,
        "comment_what_ratio": 0.1875,
        "naming_avg_length": 7.31,
        "debug_artifacts": [],
        "ai_smell_count": 9,
        "ai_smell_density": 0.06,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 63.9,
        "mechanical": 63.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\management\\commands\\show_references_index.py",
      "language": "python",
      "line_count": 37,
      "token_estimate": 305,
      "functions": [
        {
          "name": "model_name",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 9,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "handle",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 17,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 22,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 13,
              "description": "Function is 24 lines (> 22 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 24 lines (> 22 dynamic threshold)",
                "impact": "Function handle is 24 lines \u2014 exceeds 22 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 13,
        "function_length_stddev": 15.56,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 37,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.28,
        "debug_artifacts": [],
        "ai_smell_count": 3,
        "ai_smell_density": 0.081081,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 73.33,
        "mechanical": 73.33,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0007_page_latest_revision_created_at.py",
      "language": "python",
      "line_count": 18,
      "token_estimate": 103,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 18,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.75,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0015_add_more_verbose_names.py",
      "language": "python",
      "line_count": 147,
      "token_estimate": 1187,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 147,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0023_alter_page_revision_on_delete_behaviour.py",
      "language": "python",
      "line_count": 25,
      "token_estimate": 151,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 25,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0030_index_on_pagerevision_created_at.py",
      "language": "python",
      "line_count": 17,
      "token_estimate": 96,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 17,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.82,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0038_make_first_published_at_editable.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 124,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0046_site_name_remove_null.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 158,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0054_initial_locale.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 153,
      "functions": [
        {
          "name": "initial_locale",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 14,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 10,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 10,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3537,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 6,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.22,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.08,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 80.0,
        "mechanical": 80.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0062_comment_models_and_pagesubscription.py",
      "language": "python",
      "line_count": 150,
      "token_estimate": 1328,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 149,
        "comment_ratio": 0.0067,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.57,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0070_rename_pagerevision_revision.py",
      "language": "python",
      "line_count": 80,
      "token_estimate": 599,
      "functions": [
        {
          "name": "disable_sqlite_legacy_alter_table",
          "type": "function_definition",
          "line_start": 7,
          "line_end": 10,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 4,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 78,
        "comment_ratio": 0.025,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.91,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 94.5,
        "mechanical": 94.5,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0078_referenceindex.py",
      "language": "python",
      "line_count": 76,
      "token_estimate": 615,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 75,
        "comment_ratio": 0.0132,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0086_populate_grouppagepermission_permission.py",
      "language": "python",
      "line_count": 89,
      "token_estimate": 775,
      "functions": [
        {
          "name": "add_permissions",
          "type": "function_definition",
          "line_start": 8,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0756,
          "ai_signals": []
        },
        {
          "name": "populate_grouppagepermission_permission",
          "type": "function_definition",
          "line_start": 16,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 17,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 18,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 18,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 19,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 19,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4256,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "revert_grouppagepermission_permission",
          "type": "function_definition",
          "line_start": 44,
          "line_end": 73,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 45,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 45,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 46,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 46,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4256,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 20.67,
        "function_length_stddev": 12.86,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 8,
        "code_lines": 81,
        "comment_ratio": 0.0899,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.08,
        "debug_artifacts": [],
        "ai_smell_count": 10,
        "ai_smell_density": 0.123457,
        "structural_uniformity": 0.3778,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 71.8,
        "mechanical": 71.8,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\migrations\\0094_alter_page_locale.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 132,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 19,
        "comment_ratio": 0.05,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.97,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\content_types.py",
      "language": "python",
      "line_count": 12,
      "token_estimate": 75,
      "functions": [
        {
          "name": "get_default_page_content_type",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 11,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 11,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 11,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 8,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 4,
        "code_lines": 8,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.27,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.25,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 75.0,
        "mechanical": 75.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\models\\panels.py",
      "language": "python",
      "line_count": 38,
      "token_estimate": 309,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 17,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1491,
          "ai_signals": []
        },
        {
          "name": "panel_class",
          "type": "decorated_definition",
          "line_start": 19,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1491,
          "ai_signals": [],
          "decorators": [
            "cached_property"
          ]
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 24,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1491,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 33,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1491,
          "ai_signals": []
        },
        {
          "name": "construct",
          "type": "function_definition",
          "line_start": 35,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1491,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 3.6,
        "function_length_stddev": 1.52,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 6,
        "code_lines": 32,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.1667,
        "naming_avg_length": 7.04,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.5787,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 98.9,
        "mechanical": 98.9,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\permission_policies\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 8,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 4.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\home\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 201,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.94,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\project_template\\project_name\\settings\\dev.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 102,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 16,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.71,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\rich_text\\__init__.py",
      "language": "python",
      "line_count": 193,
      "token_estimate": 1616,
      "functions": [
        {
          "name": "get_rewriter",
          "type": "decorated_definition",
          "line_start": 22,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "expand_db_html",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "extract_references_from_rich_text",
          "type": "function_definition",
          "line_start": 60,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "get_text_for_indexing",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 88,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__html__",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 96,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__bool__",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "__eq__",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 105,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "get_model",
          "type": "decorated_definition",
          "line_start": 121,
          "line_end": 126,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 122,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 122,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "get_instance",
          "type": "decorated_definition",
          "line_start": 128,
          "line_end": 131,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 130,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 130,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_many",
          "type": "decorated_definition",
          "line_start": 133,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 135,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 135,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.39,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "expand_db_attributes",
          "type": "decorated_definition",
          "line_start": 141,
          "line_end": 147,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "staticmethod"
          ]
        },
        {
          "name": "expand_db_attributes_many",
          "type": "decorated_definition",
          "line_start": 149,
          "line_end": 155,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "extract_references",
          "type": "decorated_definition",
          "line_start": 157,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 181,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 191,
          "line_end": 192,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.04,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 17,
        "avg_function_length": 6.29,
        "function_length_stddev": 6.32,
        "import_count": 10,
        "export_count": 0,
        "comment_lines": 54,
        "code_lines": 139,
        "comment_ratio": 0.2798,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.49,
        "debug_artifacts": [],
        "ai_smell_count": 6,
        "ai_smell_density": 0.043165,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.89,
        "mechanical": 88.89,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\__init__.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 14,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\database\\postgres\\weights.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 18,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.14,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\backends\\elasticsearch9.py",
      "language": "python",
      "line_count": 36,
      "token_estimate": 272,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 36,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 20.78,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 96,
      "token_estimate": 728,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 96,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.87,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\migrations\\0009_remove_ngram_autocomplete.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 491,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 23,
        "code_lines": 23,
        "comment_ratio": 0.5,
        "comment_what_ratio": 0.0588,
        "naming_avg_length": 6.91,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\search\\utils.py",
      "language": "python",
      "line_count": 2,
      "token_estimate": 11,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 2,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.0,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\sites\\wagtail_hooks.py",
      "language": "python",
      "line_count": 32,
      "token_estimate": 200,
      "functions": [
        {
          "name": "register_viewset",
          "type": "decorated_definition",
          "line_start": 11,
          "line_end": 13,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 13,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4295,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_admin_viewset\")"
          ]
        },
        {
          "name": "is_shown",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 20,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0795,
          "ai_signals": []
        },
        {
          "name": "register_sites_menu_item",
          "type": "decorated_definition",
          "line_start": 23,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0795,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_settings_menu_item\")"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 3,
        "avg_function_length": 5.33,
        "function_length_stddev": 3.21,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 32,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.15,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.03125,
        "structural_uniformity": 0.3973,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 92.19,
        "mechanical": 92.19,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\models.py",
      "language": "python",
      "line_count": 171,
      "token_estimate": 1499,
      "functions": [
        {
          "name": "get_snippet_models",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 34,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": []
        },
        {
          "name": "get_workflow_enabled_models",
          "type": "decorated_definition",
          "line_start": 37,
          "line_end": 39,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": [],
          "decorators": [
            "lru_cache(maxsize=None)"
          ]
        },
        {
          "name": "get_editable_models",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 49,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 63,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": []
        },
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 65,
          "line_end": 70,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": []
        },
        {
          "name": "register_snippet",
          "type": "function_definition",
          "line_start": 73,
          "line_end": 81,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0174,
          "ai_signals": []
        },
        {
          "name": "_register_snippet_immediately",
          "type": "function_definition",
          "line_start": 84,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 94,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 94,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 94,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 101,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 101,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 101,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3674,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "register_deferred_snippets",
          "type": "function_definition",
          "line_start": 113,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 120,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3674,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_extra_permissions",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 2,
            "parameter_count": 5,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 127,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 129,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 130,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 130,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 131,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 131,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 132,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 135,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 135,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 163,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 124,
              "description": "Function is 47 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 30 dynamic threshold)",
                "impact": "Function create_extra_permissions is 47 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3674,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 13.89,
        "function_length_stddev": 14.18,
        "import_count": 15,
        "export_count": 0,
        "comment_lines": 27,
        "code_lines": 144,
        "comment_ratio": 0.1579,
        "comment_what_ratio": 0.087,
        "naming_avg_length": 8.5,
        "debug_artifacts": [],
        "ai_smell_count": 18,
        "ai_smell_density": 0.125,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 67.56,
        "mechanical": 67.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_chooser_block.py",
      "language": "python",
      "line_count": 198,
      "token_estimate": 1968,
      "functions": [
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 22,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_reference_model_by_string",
          "type": "function_definition",
          "line_start": 34,
          "line_end": 37,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 67,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 47,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 55,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 59,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4186,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_response",
          "type": "function_definition",
          "line_start": 69,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 79,
          "line_end": 89,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_deconstruct",
          "type": "function_definition",
          "line_start": 91,
          "line_end": 96,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_extract_references",
          "type": "function_definition",
          "line_start": 98,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_exception_on_non_snippet_model",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 113,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 110,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 110,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4186,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serialize",
          "type": "function_definition",
          "line_start": 119,
          "line_end": 127,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_deserialize",
          "type": "function_definition",
          "line_start": 129,
          "line_end": 137,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_adapt",
          "type": "function_definition",
          "line_start": 139,
          "line_end": 167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 147,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 155,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 159,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4186,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_form_response",
          "type": "function_definition",
          "line_start": 169,
          "line_end": 183,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 185,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0686,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 14,
        "avg_function_length": 11.93,
        "function_length_stddev": 7.84,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 189,
        "comment_ratio": 0.0455,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 9.13,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.042328,
        "structural_uniformity": 0.3428,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.2,
        "mechanical": 88.2,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_edit_view.py",
      "language": "python",
      "line_count": 3303,
      "token_estimate": 31780,
      "functions": [
        {
          "name": "get_edit_url",
          "type": "function_definition",
          "line_start": 50,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 55,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 59,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 61,
          "line_end": 62,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "assertSchedulingDialogRendered",
          "type": "function_definition",
          "line_start": 64,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 64,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 66,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 68,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.394,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 104,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 104,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 105,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_with_limited_permissions",
          "type": "function_definition",
          "line_start": 112,
          "line_end": 122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 116,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3735,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 124,
          "line_end": 187,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 126,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 128,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 154,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 124,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function test_simple is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2741,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_get_hydrate_create_view",
          "type": "function_definition",
          "line_start": 189,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 101,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 192,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 193,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 189,
              "description": "Function is 101 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 101 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_hydrate_create_view is 101 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1593,
          "ai_signals": []
        },
        {
          "name": "test_non_existent_model",
          "type": "function_definition",
          "line_start": 291,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 291,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 291,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_nonexistent_id",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_limited_permissions",
          "type": "function_definition",
          "line_start": 303,
          "line_end": 318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 307,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2741,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 320,
          "line_end": 368,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 322,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 320,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_invalid is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1982,
          "ai_signals": []
        },
        {
          "name": "test_edit_invalid_with_json_response",
          "type": "function_definition",
          "line_start": 370,
          "line_end": 384,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 378,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2887,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 386,
          "line_end": 397,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_json_response",
          "type": "function_definition",
          "line_start": 399,
          "line_end": 418,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 415,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2303,
          "ai_signals": []
        },
        {
          "name": "test_edit_with_tags",
          "type": "function_definition",
          "line_start": 420,
          "line_end": 436,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_before_edit_snippet_hook_get",
          "type": "function_definition",
          "line_start": 438,
          "line_end": 449,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 449,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.347,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_before_edit_snippet_hook_get_with_json_response",
          "type": "function_definition",
          "line_start": 451,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 473,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 487,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2445,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_before_edit_snippet_hook_post",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 508,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 505,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2303,
          "ai_signals": []
        },
        {
          "name": "test_before_edit_snippet_hook_post_with_json_response",
          "type": "function_definition",
          "line_start": 510,
          "line_end": 562,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 53,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 537,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 559,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 510,
              "description": "Function is 53 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 53 lines (> 37 dynamic threshold)",
                "impact": "Function test_before_edit_snippet_hook_post_with_json_response is 53 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2534,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_after_edit_snippet_hook",
          "type": "function_definition",
          "line_start": 564,
          "line_end": 583,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 580,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2303,
          "ai_signals": []
        },
        {
          "name": "test_after_edit_snippet_hook_with_json_response",
          "type": "function_definition",
          "line_start": 585,
          "line_end": 631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 47,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 612,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 628,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 585,
              "description": "Function is 47 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 47 lines (> 37 dynamic threshold)",
                "impact": "Function test_after_edit_snippet_hook_with_json_response is 47 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2787,
          "ai_signals": [
            "High anti-pattern density (0.64)"
          ]
        },
        {
          "name": "test_register_snippet_action_menu_item",
          "type": "function_definition",
          "line_start": 633,
          "line_end": 657,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 635,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1953,
          "ai_signals": []
        },
        {
          "name": "test_construct_snippet_action_menu",
          "type": "function_definition",
          "line_start": 659,
          "line_end": 673,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_previewable_snippet",
          "type": "function_definition",
          "line_start": 675,
          "line_end": 696,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 681,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 692,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 695,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_custom_preview_sizes",
          "type": "function_definition",
          "line_start": 698,
          "line_end": 716,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 705,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 710,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 711,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_resource_cleanup",
              "severity": "high",
              "line": 714,
              "description": "Training job without GPU/resource cleanup \u2014 leaked resources",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 715,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 720,
          "line_end": 726,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_snippet_with_tabbed_interface",
          "type": "function_definition",
          "line_start": 728,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 732,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 737,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 741,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 746,
          "line_end": 750,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_file_upload_multipart",
          "type": "function_definition",
          "line_start": 752,
          "line_end": 766,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 776,
          "line_end": 781,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector",
          "type": "function_definition",
          "line_start": 783,
          "line_end": 786,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_without_translation",
          "type": "function_definition",
          "line_start": 788,
          "line_end": 795,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_locale_selector_not_present_when_i18n_disabled",
          "type": "decorated_definition",
          "line_start": 797,
          "line_end": 801,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_locale_selector_not_present_on_non_translatable_snippet",
          "type": "function_definition",
          "line_start": 803,
          "line_end": 807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 811,
          "line_end": 813,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_get_hydrate_create_view",
          "type": "function_definition",
          "line_start": 815,
          "line_end": 928,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 114,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 819,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 820,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 815,
              "description": "Function is 114 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 114 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_hydrate_create_view is 114 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1474,
          "ai_signals": []
        },
        {
          "name": "test_edit_snippet_with_revision",
          "type": "function_definition",
          "line_start": 930,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_snippet_with_revision_and_json_response",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 968,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 953,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_snippet_with_revision_and_json_response is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2348,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_edit_with_inline_models_and_json_response",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 1017,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1011,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1953,
          "ai_signals": []
        },
        {
          "name": "test_save_outdated_revision_with_json_response",
          "type": "function_definition",
          "line_start": 1019,
          "line_end": 1049,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1039,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1682,
          "ai_signals": []
        },
        {
          "name": "test_save_outdated_revision_timestampwith_json_response",
          "type": "function_definition",
          "line_start": 1051,
          "line_end": 1083,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1073,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1614,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision_with_json_response",
          "type": "function_definition",
          "line_start": 1085,
          "line_end": 1158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1107,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1116,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1085,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function test_overwrite_revision_with_json_response is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1972,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_non_latest_revision",
          "type": "function_definition",
          "line_start": 1160,
          "line_end": 1202,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1183,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1160,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_overwrite_non_latest_revision is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2181,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_nonexistent_revision",
          "type": "function_definition",
          "line_start": 1204,
          "line_end": 1242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "llamaindex_no_text_splitter_language",
              "severity": "medium",
              "line": 1222,
              "description": "Code files split with generic text splitter -- loses function boundaries",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1204,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_overwrite_nonexistent_revision is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2348,
          "ai_signals": [
            "High anti-pattern density (0.51)"
          ]
        },
        {
          "name": "test_save_with_json_response_does_not_affect_sessions",
          "type": "function_definition",
          "line_start": 1244,
          "line_end": 1271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1246,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1246,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3053,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1280,
          "line_end": 1284,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_get",
          "type": "function_definition",
          "line_start": 1286,
          "line_end": 1347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1291,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1293,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1307,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1326,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1337,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1286,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_get is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.394,
          "ai_signals": [
            "High anti-pattern density (0.97)"
          ]
        },
        {
          "name": "test_get_hydrate_create_view",
          "type": "function_definition",
          "line_start": 1349,
          "line_end": 1491,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 143,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1363,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1364,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1349,
              "description": "Function is 143 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 143 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_hydrate_create_view is 143 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1287,
          "ai_signals": []
        },
        {
          "name": "test_autosave_disabled",
          "type": "decorated_definition",
          "line_start": 1493,
          "line_end": 1502,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1497,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTOSAVE_INTERVAL=0)"
          ]
        },
        {
          "name": "test_autosave_custom_interval",
          "type": "decorated_definition",
          "line_start": 1504,
          "line_end": 1518,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1508,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2887,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ],
          "decorators": [
            "override_settings(WAGTAIL_AUTOSAVE_INTERVAL=2000)"
          ]
        },
        {
          "name": "test_save_draft",
          "type": "function_definition",
          "line_start": 1520,
          "line_end": 1553,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1553,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1583,
          "ai_signals": []
        },
        {
          "name": "test_skip_validation_on_save_draft",
          "type": "function_definition",
          "line_start": 1555,
          "line_end": 1591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1580,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1589,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2445,
          "ai_signals": [
            "High anti-pattern density (0.54)"
          ]
        },
        {
          "name": "test_required_asterisk_on_reshowing_form",
          "type": "function_definition",
          "line_start": 1593,
          "line_end": 1615,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 1610,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1614,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1615,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_publish_invalid",
          "type": "function_definition",
          "line_start": 1617,
          "line_end": 1645,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_publish",
          "type": "function_definition",
          "line_start": 1647,
          "line_end": 1714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1667,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1647,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1583,
          "ai_signals": []
        },
        {
          "name": "test_publish_bad_permissions",
          "type": "function_definition",
          "line_start": 1716,
          "line_end": 1766,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 51,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1720,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1724,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 1727,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1716,
              "description": "Function is 51 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 51 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_bad_permissions is 51 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3298,
          "ai_signals": [
            "High anti-pattern density (0.78)"
          ]
        },
        {
          "name": "test_publish_with_publish_permission",
          "type": "function_definition",
          "line_start": 1768,
          "line_end": 1855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 88,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1772,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1776,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 1780,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1808,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1768,
              "description": "Function is 88 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 88 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_with_publish_permission is 88 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2542,
          "ai_signals": [
            "High anti-pattern density (0.57)"
          ]
        },
        {
          "name": "test_save_draft_then_publish",
          "type": "function_definition",
          "line_start": 1857,
          "line_end": 1899,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1857,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_save_draft_then_publish is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1367,
          "ai_signals": []
        },
        {
          "name": "test_publish_then_save_draft",
          "type": "function_definition",
          "line_start": 1901,
          "line_end": 1941,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1901,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_then_save_draft is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1407,
          "ai_signals": []
        },
        {
          "name": "test_publish_twice",
          "type": "function_definition",
          "line_start": 1943,
          "line_end": 1990,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1943,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_twice is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1282,
          "ai_signals": []
        },
        {
          "name": "test_get_after_save_draft",
          "type": "function_definition",
          "line_start": 1992,
          "line_end": 2021,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 1997,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2002,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2008,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_get_after_publish",
          "type": "function_definition",
          "line_start": 2023,
          "line_end": 2057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2033,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2038,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2044,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3553,
          "ai_signals": [
            "High anti-pattern density (0.86)"
          ]
        },
        {
          "name": "test_get_after_publish_and_save_draft",
          "type": "function_definition",
          "line_start": 2059,
          "line_end": 2110,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2068,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 2071,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2076,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2082,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2097,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2059,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_get_after_publish_and_save_draft is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_scheduled",
          "type": "function_definition",
          "line_start": 2112,
          "line_end": 2186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2167,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2170,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2112,
              "description": "Function is 75 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_scheduled is 75 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1953,
          "ai_signals": []
        },
        {
          "name": "test_edit_scheduled_go_live_before_expiry",
          "type": "function_definition",
          "line_start": 2188,
          "line_end": 2223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2201,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2206,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2213,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2221,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 2222,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_scheduled_expire_in_the_past",
          "type": "function_definition",
          "line_start": 2225,
          "line_end": 2254,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2237,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2244,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2252,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 2253,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_invalid_schedule_with_existing_draft_schedule",
          "type": "function_definition",
          "line_start": 2256,
          "line_end": 2320,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 65,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2282,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2285,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2300,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2310,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2318,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 2319,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2256,
              "description": "Function is 65 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 65 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_invalid_schedule_with_existing_draft_schedule is 65 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_first_published_at_editable",
          "type": "function_definition",
          "line_start": 2322,
          "line_end": 2347,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_scheduled_unpublished",
          "type": "function_definition",
          "line_start": 2349,
          "line_end": 2408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 60,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2390,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2393,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2349,
              "description": "Function is 60 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 60 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_scheduled_unpublished is 60 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2303,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_now_an_already_scheduled_unpublished",
          "type": "function_definition",
          "line_start": 2410,
          "line_end": 2471,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2410,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_now_an_already_scheduled_unpublished is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1118,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_scheduled_published",
          "type": "function_definition",
          "line_start": 2473,
          "line_end": 2551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 79,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2533,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2536,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2473,
              "description": "Function is 79 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 79 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_scheduled_published is 79 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1882,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_now_an_already_scheduled_published",
          "type": "function_definition",
          "line_start": 2553,
          "line_end": 2620,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2553,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_now_an_already_scheduled_published is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1068,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_save_schedule_before_a_scheduled_expire",
          "type": "function_definition",
          "line_start": 2622,
          "line_end": 2726,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 105,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2707,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2710,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2622,
              "description": "Function is 105 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 105 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_save_schedule_before_a_scheduled_expire is 105 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1553,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_schedule_before_a_scheduled_expire",
          "type": "function_definition",
          "line_start": 2728,
          "line_end": 2822,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 95,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2804,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2807,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2728,
              "description": "Function is 95 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 95 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_schedule_before_a_scheduled_expire is 95 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1658,
          "ai_signals": []
        },
        {
          "name": "test_edit_post_publish_schedule_after_a_scheduled_expire",
          "type": "function_definition",
          "line_start": 2824,
          "line_end": 2921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 98,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2903,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2906,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2824,
              "description": "Function is 98 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 98 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_publish_schedule_after_a_scheduled_expire is 98 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1625,
          "ai_signals": []
        },
        {
          "name": "test_use_fallback_for_blank_string_representation",
          "type": "function_definition",
          "line_start": 2923,
          "line_end": 2940,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 2935,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2939,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2940,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 2944,
          "line_end": 2954,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_edit_get_scheduled_for_publishing_with_publish_permission",
          "type": "function_definition",
          "line_start": 2956,
          "line_end": 3028,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2960,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2963,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2966,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2978,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 2981,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3008,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2956,
              "description": "Function is 73 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_scheduled_for_publishing_with_publish_permission is 73 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3909,
          "ai_signals": [
            "High anti-pattern density (0.96)"
          ]
        },
        {
          "name": "test_edit_get_scheduled_for_publishing_without_publish_permission",
          "type": "function_definition",
          "line_start": 3030,
          "line_end": 3095,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3034,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3037,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 3040,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3045,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 3048,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3075,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3030,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_get_scheduled_for_publishing_without_publish_permission is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_post_scheduled_for_publishing",
          "type": "function_definition",
          "line_start": 3097,
          "line_end": 3157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 61,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3137,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3097,
              "description": "Function is 61 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 61 lines (> 37 dynamic threshold)",
                "impact": "Function test_edit_post_scheduled_for_publishing is 61 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1701,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3163,
          "line_end": 3171,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "get",
          "type": "function_definition",
          "line_start": 3173,
          "line_end": 3178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "post",
          "type": "function_definition",
          "line_start": 3180,
          "line_end": 3185,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "create",
          "type": "function_definition",
          "line_start": 3187,
          "line_end": 3191,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_show_edit_view",
          "type": "function_definition",
          "line_start": 3193,
          "line_end": 3198,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3194,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3198,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_edit_invalid",
          "type": "function_definition",
          "line_start": 3200,
          "line_end": 3228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3202,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.176,
          "ai_signals": []
        },
        {
          "name": "test_edit",
          "type": "function_definition",
          "line_start": 3230,
          "line_end": 3246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_create",
          "type": "function_definition",
          "line_start": 3248,
          "line_end": 3262,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0553,
          "ai_signals": []
        },
        {
          "name": "test_get_delete",
          "type": "function_definition",
          "line_start": 3264,
          "line_end": 3276,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3265,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3275,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4053,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_usage_link",
          "type": "function_definition",
          "line_start": 3278,
          "line_end": 3302,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3279,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 3289,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3353,
          "ai_signals": [
            "High anti-pattern density (0.80)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 92,
        "avg_function_length": 34.03,
        "function_length_stddev": 29.8,
        "import_count": 27,
        "export_count": 0,
        "comment_lines": 278,
        "code_lines": 3025,
        "comment_ratio": 0.0842,
        "comment_what_ratio": 0.1524,
        "naming_avg_length": 7.58,
        "debug_artifacts": [],
        "ai_smell_count": 166,
        "ai_smell_density": 0.054876,
        "structural_uniformity": 0.1242,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.24,
        "mechanical": 78.24,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\snippets\\tests\\test_reordering.py",
      "language": "python",
      "line_count": 320,
      "token_estimate": 3469,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "get_url_name",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 21,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_header_button_rendered",
          "type": "function_definition",
          "line_start": 23,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 28,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1891,
          "ai_signals": []
        },
        {
          "name": "test_show_ordering_column",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 53,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 86,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 91,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 92,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 48,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_show_ordering_column is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_reordering_disabled_with_insufficient_permission",
          "type": "function_definition",
          "line_start": 97,
          "line_end": 139,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 101,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 104,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 110,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 121,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 97,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_reordering_disabled_with_insufficient_permission is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_minimal_permission",
          "type": "function_definition",
          "line_start": 141,
          "line_end": 162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 145,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 148,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 152,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_create_sets_max_sort_order",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 186,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "get_url",
          "type": "function_definition",
          "line_start": 200,
          "line_end": 204,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "assertOrder",
          "type": "function_definition",
          "line_start": 206,
          "line_end": 213,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_get_request_does_not_alter_order",
          "type": "function_definition",
          "line_start": 215,
          "line_end": 220,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_post_request_without_position_argument_moves_to_the_end",
          "type": "function_definition",
          "line_start": 222,
          "line_end": 228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_post_request_with_non_integer_position_moves_to_the_end",
          "type": "function_definition",
          "line_start": 230,
          "line_end": 236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_move_position_up",
          "type": "function_definition",
          "line_start": 238,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_move_position_down",
          "type": "function_definition",
          "line_start": 248,
          "line_end": 255,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_move_position_to_same_position",
          "type": "function_definition",
          "line_start": 257,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_move_position_with_invalid_target_position",
          "type": "function_definition",
          "line_start": 265,
          "line_end": 271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0433,
          "ai_signals": []
        },
        {
          "name": "test_insufficient_permission",
          "type": "function_definition",
          "line_start": 273,
          "line_end": 300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 277,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 280,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 283,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 292,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 295,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_minimal_permission",
          "type": "function_definition",
          "line_start": 302,
          "line_end": 319,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 306,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 309,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 312,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.3933,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 14.25,
        "function_length_stddev": 12.79,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 35,
        "code_lines": 285,
        "comment_ratio": 0.1094,
        "comment_what_ratio": 0.1143,
        "naming_avg_length": 7.25,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.077193,
        "structural_uniformity": 0.1022,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.88,
        "mechanical": 78.88,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\templatetags\\wagtail_cache.py",
      "language": "python",
      "line_count": 99,
      "token_estimate": 807,
      "functions": [
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 20,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.369,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 52,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0998,
          "ai_signals": []
        },
        {
          "name": "render",
          "type": "function_definition",
          "line_start": 54,
          "line_end": 65,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0998,
          "ai_signals": []
        },
        {
          "name": "register_cache_tag",
          "type": "function_definition",
          "line_start": 68,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0998,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 15.5,
        "function_length_stddev": 7.77,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 20,
        "code_lines": 79,
        "comment_ratio": 0.202,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.7,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.012658,
        "structural_uniformity": 0.4989,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.69,
        "mechanical": 91.69,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\customuser\\forms.py",
      "language": "python",
      "line_count": 20,
      "token_estimate": 165,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 20,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.96,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\dummy_sendfile_backend.py",
      "language": "python",
      "line_count": 9,
      "token_estimate": 47,
      "functions": [
        {
          "name": "sendfile",
          "type": "function_definition",
          "line_start": 4,
          "line_end": 8,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 1,
        "avg_function_length": 5,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 6,
        "comment_ratio": 0.3333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.8,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\emailuser\\models.py",
      "language": "python",
      "line_count": 54,
      "token_estimate": 413,
      "functions": [
        {
          "name": "_create_user",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 5,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 17,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2333,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "create_user",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "create_superuser",
          "type": "function_definition",
          "line_start": 31,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_full_name",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "get_short_name",
          "type": "function_definition",
          "line_start": 52,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 4.6,
        "function_length_stddev": 5.81,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 51,
        "comment_ratio": 0.0556,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.61,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.019608,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 95.1,
        "mechanical": 95.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\i18n\\models.py",
      "language": "python",
      "line_count": 57,
      "token_estimate": 363,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 57,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 10.19,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\routablepage\\migrations\\0002_routablepagewithoutindexroutetest.py",
      "language": "python",
      "line_count": 39,
      "token_estimate": 280,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 38,
        "comment_ratio": 0.0256,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.81,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 76,
      "token_estimate": 528,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 76,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.84,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\snippets\\migrations\\0009_filterablesnippet_some_date.py",
      "language": "python",
      "line_count": 19,
      "token_estimate": 100,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 18,
        "comment_ratio": 0.0526,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.64,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\streamfield_migrations\\migrations\\0001_initial.py",
      "language": "python",
      "line_count": 338,
      "token_estimate": 4077,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 2,
        "code_lines": 336,
        "comment_ratio": 0.0059,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.48,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\forms.py",
      "language": "python",
      "line_count": 51,
      "token_estimate": 359,
      "functions": [
        {
          "name": "clean_foo",
          "type": "function_definition",
          "line_start": 9,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2251,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 24,
          "line_end": 32,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.2251,
          "ai_signals": [
            "Suspiciously uniform function lengths (0.93)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 9.5,
        "function_length_stddev": 0.71,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 5,
        "code_lines": 46,
        "comment_ratio": 0.098,
        "comment_what_ratio": 0.2,
        "naming_avg_length": 7.28,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.9256,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 93.25,
        "mechanical": 93.25,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0007_draftstatecustomprimarykeymodel.py",
      "language": "python",
      "line_count": 100,
      "token_estimate": 834,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 99,
        "comment_ratio": 0.01,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.74,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0015_gallerypage_gallerypageimage.py",
      "language": "python",
      "line_count": 76,
      "token_estimate": 581,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 75,
        "comment_ratio": 0.0132,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.95,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0023_snippetchoosermodel_full_featured.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 162,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.08,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0031_searchtestmodel.py",
      "language": "python",
      "line_count": 30,
      "token_estimate": 190,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 1,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 29,
        "comment_ratio": 0.0333,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.09,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0039_alter_eventcategory_locale_and_more.py",
      "language": "python",
      "line_count": 46,
      "token_estimate": 494,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 45,
        "comment_ratio": 0.0217,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0047_advertwithcustomuuidprimarykey_page.py",
      "language": "python",
      "line_count": 26,
      "token_estimate": 167,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 25,
        "comment_ratio": 0.0385,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.97,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\migrations\\0055_previewable_settings.py",
      "language": "python",
      "line_count": 63,
      "token_estimate": 459,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 62,
        "comment_ratio": 0.0159,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.99,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\testapp\\models.py",
      "language": "python",
      "line_count": 2744,
      "token_estimate": 18982,
      "functions": [
        {
          "name": "link",
          "type": "decorated_definition",
          "line_start": 139,
          "line_end": 146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_admin_display_title",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "preview_modes",
          "type": "decorated_definition",
          "line_start": 223,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_mode",
          "type": "decorated_definition",
          "line_start": 227,
          "line_end": 229,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 231,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "preview_sizes",
          "type": "decorated_definition",
          "line_start": 240,
          "line_end": 242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_size",
          "type": "decorated_definition",
          "line_start": 244,
          "line_end": 246,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "route",
          "type": "function_definition",
          "line_start": 300,
          "line_end": 301,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 301,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 301,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 301,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 301,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "name_display",
          "type": "decorated_definition",
          "line_start": 373,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 393,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 401,
          "line_end": 410,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_url_parts",
          "type": "function_definition",
          "line_start": 528,
          "line_end": 534,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "route",
          "type": "function_definition",
          "line_start": 536,
          "line_end": 542,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_admin_display_title",
          "type": "function_definition",
          "line_start": 544,
          "line_end": 545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_events",
          "type": "function_definition",
          "line_start": 563,
          "line_end": 564,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_paginator",
          "type": "function_definition",
          "line_start": 566,
          "line_end": 567,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 569,
          "line_end": 582,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "route",
          "type": "function_definition",
          "line_start": 584,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 587,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 587,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 587,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 587,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 588,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_sitemap_urls",
          "type": "function_definition",
          "line_start": 593,
          "line_end": 600,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_cached_paths",
          "type": "function_definition",
          "line_start": 602,
          "line_end": 603,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 616,
          "line_end": 619,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 647,
          "line_end": 672,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 658,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 669,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2901,
          "ai_signals": [
            "High anti-pattern density (0.77)"
          ]
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 719,
          "line_end": 722,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "render_landing_page",
          "type": "function_definition",
          "line_start": 724,
          "line_end": 731,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 757,
          "line_end": 763,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_context",
          "type": "function_definition",
          "line_start": 782,
          "line_end": 785,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_form_fields",
          "type": "function_definition",
          "line_start": 787,
          "line_end": 788,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_data_fields",
          "type": "function_definition",
          "line_start": 790,
          "line_end": 796,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_submission_class",
          "type": "function_definition",
          "line_start": 798,
          "line_end": 799,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "process_form_submission",
          "type": "function_definition",
          "line_start": 801,
          "line_end": 824,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 812,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1667,
          "ai_signals": []
        },
        {
          "name": "serve",
          "type": "function_definition",
          "line_start": 826,
          "line_end": 834,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 826,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 826,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 826,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 826,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 834,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 834,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 834,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 834,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "get_data",
          "type": "function_definition",
          "line_start": 863,
          "line_end": 871,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_submissions_list_view_class",
          "type": "function_definition",
          "line_start": 891,
          "line_end": 894,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_submission_class",
          "type": "function_definition",
          "line_start": 896,
          "line_end": 897,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_data_fields",
          "type": "function_definition",
          "line_start": 899,
          "line_end": 905,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_field_clean_name",
          "type": "function_definition",
          "line_start": 943,
          "line_end": 954,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 950,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 951,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3708,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "create_singleline_field",
          "type": "function_definition",
          "line_start": 963,
          "line_end": 965,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_ipaddress_field",
          "type": "function_definition",
          "line_start": 967,
          "line_end": 968,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_singleline_field",
          "type": "function_definition",
          "line_start": 977,
          "line_end": 979,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_multiline_field",
          "type": "function_definition",
          "line_start": 981,
          "line_end": 983,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_email_field",
          "type": "function_definition",
          "line_start": 985,
          "line_end": 987,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_number_field",
          "type": "function_definition",
          "line_start": 989,
          "line_end": 991,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_url_field",
          "type": "function_definition",
          "line_start": 993,
          "line_end": 995,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_checkbox_field",
          "type": "function_definition",
          "line_start": 997,
          "line_end": 999,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_checkboxes_field",
          "type": "function_definition",
          "line_start": 1001,
          "line_end": 1003,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_dropdown_field",
          "type": "function_definition",
          "line_start": 1005,
          "line_end": 1007,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_multiselect_field",
          "type": "function_definition",
          "line_start": 1009,
          "line_end": 1011,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_radio_field",
          "type": "function_definition",
          "line_start": 1013,
          "line_end": 1015,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_date_field",
          "type": "function_definition",
          "line_start": 1017,
          "line_end": 1019,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_datetime_field",
          "type": "function_definition",
          "line_start": 1021,
          "line_end": 1023,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "create_hidden_field",
          "type": "function_definition",
          "line_start": 1025,
          "line_end": 1027,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1081,
          "line_end": 1082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1098,
          "line_end": 1099,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1121,
          "line_end": 1122,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1152,
          "line_end": 1153,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1177,
          "line_end": 1178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1197,
          "line_end": 1198,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1211,
          "line_end": 1212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1223,
          "line_end": 1224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 1226,
          "line_end": 1227,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "preview_sizes",
          "type": "decorated_definition",
          "line_start": 1236,
          "line_end": 1238,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_size",
          "type": "decorated_definition",
          "line_start": 1240,
          "line_end": 1242,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1251,
          "line_end": 1252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "preview_modes",
          "type": "decorated_definition",
          "line_start": 1254,
          "line_end": 1256,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "default_preview_mode",
          "type": "decorated_definition",
          "line_start": 1258,
          "line_end": 1260,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 1262,
          "line_end": 1267,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1276,
          "line_end": 1277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1291,
          "line_end": 1292,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1306,
          "line_end": 1307,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1366,
          "line_end": 1367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "modulo_two",
          "type": "function_definition",
          "line_start": 1369,
          "line_end": 1370,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "tristate",
          "type": "function_definition",
          "line_start": 1372,
          "line_end": 1373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 1375,
          "line_end": 1376,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_foo_country_code",
          "type": "function_definition",
          "line_start": 1378,
          "line_end": 1379,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1394,
          "line_end": 1395,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 1406,
          "line_end": 1407,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_default_advert",
          "type": "function_definition",
          "line_start": 1413,
          "line_end": 1414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "can_create_at",
          "type": "decorated_definition",
          "line_start": 1625,
          "line_end": 1628,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_api_representation",
          "type": "function_definition",
          "line_start": 1783,
          "line_end": 1789,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 2015,
          "line_end": 2016,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_preview_template",
          "type": "function_definition",
          "line_start": 2023,
          "line_end": 2024,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_upload_to",
          "type": "function_definition",
          "line_start": 2089,
          "line_end": 2116,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "about_spam",
          "type": "function_definition",
          "line_start": 2120,
          "line_end": 2121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "user_can_access_editor",
          "type": "function_definition",
          "line_start": 2447,
          "line_end": 2448,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "page_locked_for_user",
          "type": "function_definition",
          "line_start": 2450,
          "line_end": 2451,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_actions",
          "type": "function_definition",
          "line_start": 2453,
          "line_end": 2462,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_template_for_action",
          "type": "function_definition",
          "line_start": 2464,
          "line_end": 2470,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "on_action",
          "type": "function_definition",
          "line_start": 2472,
          "line_end": 2476,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_task_states_user_can_moderate",
          "type": "function_definition",
          "line_start": 2478,
          "line_end": 2485,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "get_description",
          "type": "decorated_definition",
          "line_start": 2487,
          "line_end": 2489,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_message",
          "type": "function_definition",
          "line_start": 2493,
          "line_end": 2494,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "locked_for_user",
          "type": "function_definition",
          "line_start": 2500,
          "line_end": 2501,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "media",
          "type": "decorated_definition",
          "line_start": 2509,
          "line_end": 2511,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 2515,
          "line_end": 2517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "random_quotable_pk",
          "type": "function_definition",
          "line_start": 2628,
          "line_end": 2631,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "is_cool",
          "type": "function_definition",
          "line_start": 2653,
          "line_end": 2658,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2660,
          "line_end": 2661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "__str__",
          "type": "function_definition",
          "line_start": 2681,
          "line_end": 2682,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "can_view_revisions",
          "type": "function_definition",
          "line_start": 2686,
          "line_end": 2687,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        },
        {
          "name": "permissions_for_user",
          "type": "function_definition",
          "line_start": 2691,
          "line_end": 2692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0208,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 100,
        "avg_function_length": 4.4,
        "function_length_stddev": 4.58,
        "import_count": 50,
        "export_count": 0,
        "comment_lines": 179,
        "code_lines": 2565,
        "comment_ratio": 0.0652,
        "comment_what_ratio": 0.1042,
        "naming_avg_length": 8.47,
        "debug_artifacts": [],
        "ai_smell_count": 22,
        "ai_smell_density": 0.008577,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 96.65,
        "mechanical": 96.65,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\__init__.py",
      "language": "python",
      "line_count": 4,
      "token_estimate": 30,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 4,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.33,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\test\\utils\\wagtail_factories\\builder.py",
      "language": "python",
      "line_count": 142,
      "token_estimate": 1586,
      "functions": [
        {
          "name": "recurse",
          "type": "function_definition",
          "line_start": 26,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0348,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 41,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0348,
          "ai_signals": []
        },
        {
          "name": "get_block_declarations",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 6,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 50,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 62,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 81,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 48,
              "description": "Function is 50 lines (> 30 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 50 lines (> 30 dynamic threshold)",
                "impact": "Function get_block_declarations is 50 lines \u2014 exceeds 30 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2448,
          "ai_signals": [
            "High anti-pattern density (0.60)"
          ]
        },
        {
          "name": "reconstruct_key",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0348,
          "ai_signals": []
        },
        {
          "name": "validate_block_indexes_sequential",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 112,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 108,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.353,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "create_factory_class",
          "type": "function_definition",
          "line_start": 114,
          "line_end": 141,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 121,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.1598,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 6,
        "avg_function_length": 16.83,
        "function_length_stddev": 18.77,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 24,
        "code_lines": 118,
        "comment_ratio": 0.169,
        "comment_what_ratio": 0.1739,
        "naming_avg_length": 8.97,
        "debug_artifacts": [],
        "ai_smell_count": 5,
        "ai_smell_density": 0.042373,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 78.77,
        "mechanical": 78.77,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\permission_policies\\test_permission_policies.py",
      "language": "python",
      "line_count": 1440,
      "token_estimate": 13379,
      "functions": [
        {
          "name": "assertResultSetEqual",
          "type": "function_definition",
          "line_start": 17,
          "line_end": 18,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "assertUserPermissionMatrix",
          "type": "function_definition",
          "line_start": 20,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 2,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 29,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 33,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3262,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "assertUserInstancePermissionMatrix",
          "type": "function_definition",
          "line_start": 48,
          "line_end": 77,
          "metrics": {
            "cyclomatic_complexity": 5,
            "max_nesting_depth": 3,
            "parameter_count": 3,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 57,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 61,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3003,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 81,
          "line_end": 184,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 104,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 83,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 83,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 85,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 88,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "anthropic_vision_no_media_type",
              "severity": "medium",
              "line": 91,
              "description": "Image sent to Claude without media_type \u2014 API may fail or misidentify image format",
              "fix_type": "deterministic"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 96,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 99,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 115,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 121,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 127,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 135,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 141,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 147,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 155,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 81,
              "description": "Function is 104 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 104 lines (> 37 dynamic threshold)",
                "impact": "Function setUp is 104 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 188,
          "line_end": 206,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 208,
          "line_end": 212,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 214,
          "line_end": 218,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 215,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 220,
          "line_end": 224,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 226,
          "line_end": 234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 236,
          "line_end": 240,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 242,
          "line_end": 248,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 243,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 250,
          "line_end": 258,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 254,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 260,
          "line_end": 269,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 263,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4169,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 271,
          "line_end": 277,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 279,
          "line_end": 289,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 293,
          "line_end": 295,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 297,
          "line_end": 314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 316,
          "line_end": 333,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 335,
          "line_end": 350,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 352,
          "line_end": 369,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 371,
          "line_end": 390,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 392,
          "line_end": 419,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 421,
          "line_end": 451,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 453,
          "line_end": 487,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 506,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 508,
          "line_end": 527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 531,
          "line_end": 533,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 535,
          "line_end": 561,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 563,
          "line_end": 611,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 563,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_any_permission is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1384,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 613,
          "line_end": 634,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 636,
          "line_end": 664,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 666,
          "line_end": 685,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 687,
          "line_end": 742,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 687,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_any_permission_for_instance is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1294,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 744,
          "line_end": 802,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 59,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 744,
              "description": "Function is 59 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 59 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 59 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1263,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 804,
          "line_end": 870,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 804,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_any_permission_for is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1192,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 872,
          "line_end": 896,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 898,
          "line_end": 913,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 917,
          "line_end": 921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission",
          "type": "function_definition",
          "line_start": 923,
          "line_end": 951,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission",
          "type": "function_definition",
          "line_start": 953,
          "line_end": 1000,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 953,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_any_permission is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1399,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission",
          "type": "function_definition",
          "line_start": 1002,
          "line_end": 1053,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 52,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1002,
              "description": "Function is 52 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 52 lines (> 37 dynamic threshold)",
                "impact": "Function test_users_with_permission is 52 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1342,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission",
          "type": "function_definition",
          "line_start": 1055,
          "line_end": 1082,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        },
        {
          "name": "test_user_has_permission_for_instance",
          "type": "function_definition",
          "line_start": 1084,
          "line_end": 1158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 75,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1084,
              "description": "Function is 75 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 75 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_permission_for_instance is 75 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1136,
          "ai_signals": []
        },
        {
          "name": "test_user_has_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 1160,
          "line_end": 1215,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 56,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1160,
              "description": "Function is 56 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 56 lines (> 37 dynamic threshold)",
                "impact": "Function test_user_has_any_permission_for_instance is 56 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1294,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_permission_for",
          "type": "function_definition",
          "line_start": 1217,
          "line_end": 1280,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 64,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1217,
              "description": "Function is 64 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 64 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_permission_for is 64 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_instances_user_has_any_permission_for",
          "type": "function_definition",
          "line_start": 1282,
          "line_end": 1348,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1282,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_instances_user_has_any_permission_for is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1192,
          "ai_signals": []
        },
        {
          "name": "test_users_with_permission_for_instance",
          "type": "function_definition",
          "line_start": 1350,
          "line_end": 1422,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 73,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1350,
              "description": "Function is 73 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 73 lines (> 37 dynamic threshold)",
                "impact": "Function test_users_with_permission_for_instance is 73 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1149,
          "ai_signals": []
        },
        {
          "name": "test_users_with_any_permission_for_instance",
          "type": "function_definition",
          "line_start": 1424,
          "line_end": 1439,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0669,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 48,
        "avg_function_length": 28.46,
        "function_length_stddev": 23.65,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 187,
        "code_lines": 1253,
        "comment_ratio": 0.1299,
        "comment_what_ratio": 0.1657,
        "naming_avg_length": 8.72,
        "debug_artifacts": [],
        "ai_smell_count": 34,
        "ai_smell_density": 0.027135,
        "structural_uniformity": 0.169,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 86.43,
        "mechanical": 86.43,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\streamfield_migrations\\test_simple_structures.py",
      "language": "python",
      "line_count": 536,
      "token_estimate": 5530,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 56,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 58,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_combine_to_listblock",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_combine_to_listblock_no_existing_children",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 129,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_combine_single_type_to_streamblock",
          "type": "function_definition",
          "line_start": 131,
          "line_end": 158,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_combine_multiple_types_to_streamblock",
          "type": "function_definition",
          "line_start": 160,
          "line_end": 188,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_combine_to_streamblock_no_existing_children",
          "type": "function_definition",
          "line_start": 190,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_to_structblock",
          "type": "function_definition",
          "line_start": 211,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 221,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 221,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3153,
          "ai_signals": [
            "High anti-pattern density (0.59)"
          ]
        },
        {
          "name": "test_alter_value",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 263,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 272,
          "line_end": 279,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 281,
          "line_end": 304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 306,
          "line_end": 344,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 306,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1992,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 346,
          "line_end": 372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 381,
          "line_end": 392,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_blocks_and_data_not_operated_on_intact",
          "type": "function_definition",
          "line_start": 394,
          "line_end": 416,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_rename",
          "type": "function_definition",
          "line_start": 418,
          "line_end": 461,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 418,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_rename is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.189,
          "ai_signals": []
        },
        {
          "name": "test_remove",
          "type": "function_definition",
          "line_start": 463,
          "line_end": 480,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 489,
          "line_end": 496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1094,
          "ai_signals": []
        },
        {
          "name": "test_to_structblock",
          "type": "function_definition",
          "line_start": 498,
          "line_end": 535,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 506,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 506,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 498,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_to_structblock is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3858,
          "ai_signals": [
            "High anti-pattern density (0.79)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 23.75,
        "function_length_stddev": 10.76,
        "import_count": 4,
        "export_count": 0,
        "comment_lines": 116,
        "code_lines": 420,
        "comment_ratio": 0.2164,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.01,
        "debug_artifacts": [],
        "ai_smell_count": 7,
        "ai_smell_density": 0.016667,
        "structural_uniformity": 0.5472,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 91.71,
        "mechanical": 91.71,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_hooks.py",
      "language": "python",
      "line_count": 202,
      "token_estimate": 1741,
      "functions": [
        {
          "name": "test_hook",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 15,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": []
        },
        {
          "name": "setUpClass",
          "type": "decorated_definition",
          "line_start": 21,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "tearDownClass",
          "type": "decorated_definition",
          "line_start": 25,
          "line_end": 27,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": [],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "test_before_hook",
          "type": "function_definition",
          "line_start": 29,
          "line_end": 35,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": []
        },
        {
          "name": "test_after_hook",
          "type": "function_definition",
          "line_start": 37,
          "line_end": 43,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 54,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0092,
          "ai_signals": []
        },
        {
          "name": "test_serve_chain_order",
          "type": "function_definition",
          "line_start": 56,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 3,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 56,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 56,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 80,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 80,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 81,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 81,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 82,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 82,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 83,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 83,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 83,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 83,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_chain_modification",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 98,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 87,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 87,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 91,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 96,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 96,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 97,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 97,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 97,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 97,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 98,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_chain_halt_execution",
          "type": "function_definition",
          "line_start": 100,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 100,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 100,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 107,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 107,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 108,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 108,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 108,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 108,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 109,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_chain_view_restriction",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 123,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 111,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 111,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 118,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 118,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 121,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_always_called_last",
          "type": "function_definition",
          "line_start": 125,
          "line_end": 164,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 4,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 125,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 125,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 127,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 127,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 150,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 150,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 152,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 152,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 153,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 153,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 154,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 154,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 156,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 156,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 157,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 157,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 158,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 158,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 159,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 159,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 160,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 160,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 160,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 160,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 163,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 163,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 164,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 164,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 125,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_serve_always_called_last is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_check_view_restrictions_receives_correct_parameters",
          "type": "function_definition",
          "line_start": 166,
          "line_end": 201,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 181,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 181,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 188,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 188,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 188,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 188,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3592,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 12,
        "avg_function_length": 14.08,
        "function_length_stddev": 13.43,
        "import_count": 9,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 202,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.67,
        "debug_artifacts": [],
        "ai_smell_count": 71,
        "ai_smell_density": 0.351485,
        "structural_uniformity": 0.0462,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 70.07,
        "mechanical": 70.07,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_page_model.py",
      "language": "python",
      "line_count": 4368,
      "token_estimate": 44515,
      "functions": [
        {
          "name": "get_ct",
          "type": "function_definition",
          "line_start": 78,
          "line_end": 79,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 79,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 79,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_can_create",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 97,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_title_is_required",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 108,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_title_is_required_for_draft_page",
          "type": "function_definition",
          "line_start": 110,
          "line_end": 121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_slug_is_autogenerated",
          "type": "function_definition",
          "line_start": 123,
          "line_end": 136,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_slug_must_be_unique_within_parent",
          "type": "function_definition",
          "line_start": 138,
          "line_end": 143,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_slug_can_duplicate_other_sections",
          "type": "function_definition",
          "line_start": 145,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_slug_generation_respects_unicode_setting_true",
          "type": "decorated_definition",
          "line_start": 156,
          "line_end": 160,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ALLOW_UNICODE_SLUGS=True)"
          ]
        },
        {
          "name": "test_slug_generation_respects_unicode_setting_false",
          "type": "decorated_definition",
          "line_start": 162,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_ALLOW_UNICODE_SLUGS=False)"
          ]
        },
        {
          "name": "test_get_admin_display_title",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 170,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_admin_display_title_with_blank_draft_title",
          "type": "function_definition",
          "line_start": 172,
          "line_end": 182,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_draft_title_is_autopopulated",
          "type": "function_definition",
          "line_start": 184,
          "line_end": 197,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_asave_with_update_fields_none_saves_all_fields",
          "type": "function_definition",
          "line_start": 201,
          "line_end": 211,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 225,
          "line_end": 244,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_route_for_request_query_count",
          "type": "function_definition",
          "line_start": 246,
          "line_end": 253,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_route_for_request_value",
          "type": "function_definition",
          "line_start": 255,
          "line_end": 265,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_route_for_request_cached",
          "type": "function_definition",
          "line_start": 267,
          "line_end": 272,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_route_for_request_suppresses_404",
          "type": "function_definition",
          "line_start": 274,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_find_for_request",
          "type": "function_definition",
          "line_start": 278,
          "line_end": 288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_valid_headers_route_to_specific_site",
          "type": "function_definition",
          "line_start": 290,
          "line_end": 294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_ports_in_request_headers_are_respected",
          "type": "function_definition",
          "line_start": 296,
          "line_end": 302,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unrecognised_host_header_routes_to_default_site",
          "type": "function_definition",
          "line_start": 304,
          "line_end": 309,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unrecognised_port_and_default_host_routes_to_default_site",
          "type": "function_definition",
          "line_start": 311,
          "line_end": 316,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unrecognised_port_and_unrecognised_host_routes_to_default_site",
          "type": "function_definition",
          "line_start": 318,
          "line_end": 325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unrecognised_port_on_known_hostname_routes_there_if_no_ambiguity",
          "type": "function_definition",
          "line_start": 327,
          "line_end": 334,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unrecognised_port_on_known_hostname_routes_to_default_site_if_ambiguity",
          "type": "function_definition",
          "line_start": 336,
          "line_end": 345,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_port_in_http_host_header_is_ignored",
          "type": "function_definition",
          "line_start": 347,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_site_with_disallowed_host",
          "type": "function_definition",
          "line_start": 360,
          "line_end": 364,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 372,
          "line_end": 375,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 377,
          "line_end": 380,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_urls",
          "type": "function_definition",
          "line_start": 382,
          "line_end": 405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_with_no_url",
          "type": "function_definition",
          "line_start": 407,
          "line_end": 415,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_urls_with_multiple_sites",
          "type": "decorated_definition",
          "line_start": 417,
          "line_end": 478,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 62,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 420,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 420,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 417,
              "description": "Function is 62 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 62 lines (> 37 dynamic threshold)",
                "impact": "Function test_urls_with_multiple_sites is 62 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.291,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ALLOWED_HOSTS=[\n            \"localhost\",\n            \"testserver\",\n            \"events.example.com\",\n            \"second-events.example.com\",\n        ]\n    )"
          ]
        },
        {
          "name": "test_urls_with_non_root_urlconf",
          "type": "decorated_definition",
          "line_start": 480,
          "line_end": 506,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(ROOT_URLCONF=\"wagtail.test.non_root_urls\")"
          ]
        },
        {
          "name": "test_urls_headless",
          "type": "decorated_definition",
          "line_start": 508,
          "line_end": 517,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 513,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 513,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ROOT_URLCONF=\"wagtail.test.headless_urls\")"
          ]
        },
        {
          "name": "test_request_routing",
          "type": "function_definition",
          "line_start": 519,
          "line_end": 525,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_request_serving",
          "type": "function_definition",
          "line_start": 527,
          "line_end": 537,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 533,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 533,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 533,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 533,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 535,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_route_to_unknown_page_returns_404",
          "type": "function_definition",
          "line_start": 539,
          "line_end": 544,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_route_to_unpublished_page_returns_404",
          "type": "function_definition",
          "line_start": 546,
          "line_end": 551,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_request_scope_site_root_paths_cache",
          "type": "decorated_definition",
          "line_start": 555,
          "line_end": 585,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\"default\": {\"BACKEND\": \"django.core.cache.backends.dummy.DummyCache\"}}\n    )",
            "override_settings(ALLOWED_HOSTS=[\"dummy\"])"
          ]
        },
        {
          "name": "test_cached_parent_obj_set",
          "type": "function_definition",
          "line_start": 587,
          "line_end": 599,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_urls",
          "type": "function_definition",
          "line_start": 617,
          "line_end": 655,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 39,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 617,
              "description": "Function is 39 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 39 lines (> 37 dynamic threshold)",
                "impact": "Function test_urls is 39 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2113,
          "ai_signals": []
        },
        {
          "name": "test_urls_with_translation_activated",
          "type": "function_definition",
          "line_start": 657,
          "line_end": 661,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_urls_with_region_specific_translation_activated",
          "type": "function_definition",
          "line_start": 663,
          "line_end": 671,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 669,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 669,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 669,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_urls_with_region_specific_translation_activated_thats_in_wagtail_content_languages",
          "type": "decorated_definition",
          "line_start": 673,
          "line_end": 686,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 684,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 684,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(\n        WAGTAIL_CONTENT_LANGUAGES=[\n            (\"en\", \"English\"),\n            (\"en-us\", \"English (United States)\"),\n            (\"fr\", \"French\"),\n        ]\n    )"
          ]
        },
        {
          "name": "test_urls_with_language_not_in_wagtail_content_languages",
          "type": "function_definition",
          "line_start": 688,
          "line_end": 692,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 690,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_urls_with_different_language_tree",
          "type": "function_definition",
          "line_start": 694,
          "line_end": 725,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_urls_with_multiple_sites",
          "type": "decorated_definition",
          "line_start": 727,
          "line_end": 793,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 67,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 730,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 730,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 727,
              "description": "Function is 67 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 67 lines (> 37 dynamic threshold)",
                "impact": "Function test_urls_with_multiple_sites is 67 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2783,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        ALLOWED_HOSTS=[\n            \"localhost\",\n            \"testserver\",\n            \"events.example.com\",\n            \"second-events.example.com\",\n        ]\n    )"
          ]
        },
        {
          "name": "test_request_scope_site_root_paths_cache",
          "type": "decorated_definition",
          "line_start": 797,
          "line_end": 827,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(\n        CACHES={\"default\": {\"BACKEND\": \"django.core.cache.backends.dummy.DummyCache\"}}\n    )",
            "override_settings(ALLOWED_HOSTS=[\"dummy\"])"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 833,
          "line_end": 843,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "tearDown",
          "type": "function_definition",
          "line_start": 845,
          "line_end": 848,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_serve",
          "type": "function_definition",
          "line_start": 850,
          "line_end": 859,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 850,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 850,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_health_check_endpoint",
              "severity": "high",
              "line": 850,
              "description": "Local inference server deployed without health check endpoint -- orchestrators cannot detect crashes or hangs",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "local_inference_no_graceful_shutdown",
              "severity": "medium",
              "line": 850,
              "description": "Inference server without graceful shutdown handling -- SIGTERM kills in-flight requests, corrupts state",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 854,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 856,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_with_non_root_urls",
          "type": "decorated_definition",
          "line_start": 861,
          "line_end": 871,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 862,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 862,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 866,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 868,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ROOT_URLCONF=\"wagtail.test.non_root_urls\")"
          ]
        },
        {
          "name": "test_serve_unknown_page_returns_404",
          "type": "function_definition",
          "line_start": 873,
          "line_end": 875,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 873,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 873,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_unpublished_page_returns_404",
          "type": "function_definition",
          "line_start": 877,
          "line_end": 879,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 877,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 877,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_with_multiple_sites",
          "type": "decorated_definition",
          "line_start": 881,
          "line_end": 898,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 882,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 882,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 888,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 890,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "langsmith_no_feedback",
              "severity": "medium",
              "line": 896,
              "description": "LangSmith runs without feedback collection -- no signal for evaluation or fine-tuning",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"localhost\", \"events.example.com\"])"
          ]
        },
        {
          "name": "test_serve_with_custom_context_name",
          "type": "function_definition",
          "line_start": 900,
          "line_end": 909,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 900,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 900,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 907,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 908,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 909,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_serve_with_custom_context",
          "type": "function_definition",
          "line_start": 911,
          "line_end": 919,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 911,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 911,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_ajax_response",
          "type": "function_definition",
          "line_start": 921,
          "line_end": 927,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_before_serve_hook",
          "type": "function_definition",
          "line_start": 929,
          "line_end": 931,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 929,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 929,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_move_page",
          "type": "function_definition",
          "line_start": 937,
          "line_end": 952,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_next_siblings",
          "type": "function_definition",
          "line_start": 958,
          "line_end": 964,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_next_siblings_inclusive",
          "type": "function_definition",
          "line_start": 966,
          "line_end": 972,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_prev_siblings",
          "type": "function_definition",
          "line_start": 974,
          "line_end": 985,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_raises_error_if_non_specific_page_used",
          "type": "function_definition",
          "line_start": 991,
          "line_end": 1000,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_validate_on_save_revision",
          "type": "function_definition",
          "line_start": 1002,
          "line_end": 1006,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_validate_on_schedule_revision",
          "type": "function_definition",
          "line_start": 1008,
          "line_end": 1014,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision",
          "type": "function_definition",
          "line_start": 1016,
          "line_end": 1026,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision_reuses_log_action_uuid",
          "type": "function_definition",
          "line_start": 1028,
          "line_end": 1055,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_that_is_not_latest",
          "type": "function_definition",
          "line_start": 1057,
          "line_end": 1073,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_cannot_overwrite_revision_from_other_instance",
          "type": "function_definition",
          "line_start": 1075,
          "line_end": 1101,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_overwrite_revision_with_user_id",
          "type": "function_definition",
          "line_start": 1103,
          "line_end": 1118,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1104,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1104,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_overwrite_revision_with_wrong_user_id",
          "type": "function_definition",
          "line_start": 1120,
          "line_end": 1140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1121,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1121,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1124,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1124,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_overwrite_revision_with_omitted_user_id",
          "type": "function_definition",
          "line_start": 1142,
          "line_end": 1157,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1143,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1143,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_cannot_overwrite_anonymous_revision_with_user_id",
          "type": "function_definition",
          "line_start": 1159,
          "line_end": 1178,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 1160,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 1160,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_publish_method_will_set_live_revision",
          "type": "decorated_definition",
          "line_start": 1184,
          "line_end": 1218,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_unpublish_method_will_clean_live_revision",
          "type": "decorated_definition",
          "line_start": 1220,
          "line_end": 1257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 38,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1220,
              "description": "Function is 38 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 38 lines (> 37 dynamic threshold)",
                "impact": "Function test_unpublish_method_will_clean_live_revision is 38 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2137,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_copy_method_with_keep_live_will_update_live_revision",
          "type": "decorated_definition",
          "line_start": 1259,
          "line_end": 1294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 36,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "test_copy_method_without_keep_live_will_not_update_live_revision",
          "type": "function_definition",
          "line_start": 1296,
          "line_end": 1314,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_method_copies_latest_revision",
          "type": "function_definition",
          "line_start": 1316,
          "line_end": 1337,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_publish_with_future_go_live_does_not_set_live_revision",
          "type": "decorated_definition",
          "line_start": 1339,
          "line_end": 1381,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1339,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_publish_with_future_go_live_does_not_set_live_revision is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.203,
          "ai_signals": [],
          "decorators": [
            "freeze_time(\"2017-01-01 12:00:00\")"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 1387,
          "line_end": 1392,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_default",
          "type": "function_definition",
          "line_start": 1394,
          "line_end": 1414,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1409,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1412,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_deferred",
          "type": "function_definition",
          "line_start": 1416,
          "line_end": 1436,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1431,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1434,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4549,
          "ai_signals": [
            "High anti-pattern density (0.95)"
          ]
        },
        {
          "name": "test_copy_attrs",
          "type": "function_definition",
          "line_start": 1438,
          "line_end": 1446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_attrs_with_empty_list",
          "type": "function_definition",
          "line_start": 1448,
          "line_end": 1454,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1452,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_copy_attrs_exclude",
          "type": "function_definition",
          "line_start": 1456,
          "line_end": 1464,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_attrs_exclude_with_empty_list",
          "type": "function_definition",
          "line_start": 1466,
          "line_end": 1472,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 2,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 1470,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_specific_cached_property",
          "type": "function_definition",
          "line_start": 1474,
          "line_end": 1488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1488,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3549,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "test_specific_deferred_cached_property",
          "type": "function_definition",
          "line_start": 1490,
          "line_end": 1503,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 1503,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3716,
          "ai_signals": [
            "High anti-pattern density (0.71)"
          ]
        },
        {
          "name": "test_copy_page_copies",
          "type": "function_definition",
          "line_start": 1509,
          "line_end": 1526,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_child_objects",
          "type": "function_definition",
          "line_start": 1528,
          "line_end": 1559,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_parental_relations",
          "type": "function_definition",
          "line_start": 1561,
          "line_end": 1594,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_does_not_copy_comments",
          "type": "function_definition",
          "line_start": 1596,
          "line_end": 1621,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_does_not_copy_child_objects_if_accessor_name_in_exclude_fields",
          "type": "function_definition",
          "line_start": 1623,
          "line_end": 1659,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 37,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_process_child_object_supplied",
          "type": "function_definition",
          "line_start": 1661,
          "line_end": 1702,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 42,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1661,
              "description": "Function is 42 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 42 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_with_process_child_object_supplied is 42 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2049,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_revisions",
          "type": "function_definition",
          "line_start": 1704,
          "line_end": 1752,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1704,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_copies_revisions is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.193,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_revisions_and_doesnt_change_created_at",
          "type": "function_definition",
          "line_start": 1754,
          "line_end": 1777,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_revisions_and_doesnt_schedule",
          "type": "function_definition",
          "line_start": 1779,
          "line_end": 1818,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 40,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 1779,
              "description": "Function is 40 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 40 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_copies_revisions_and_doesnt_schedule is 40 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2091,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_doesnt_copy_revisions_if_told_not_to_do_so",
          "type": "function_definition",
          "line_start": 1820,
          "line_end": 1842,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_child_objects_with_nonspecific_class",
          "type": "function_definition",
          "line_start": 1844,
          "line_end": 1859,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_recursively",
          "type": "function_definition",
          "line_start": 1861,
          "line_end": 1887,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_recursively_with_child_objects",
          "type": "function_definition",
          "line_start": 1889,
          "line_end": 1918,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_recursively_with_revisions",
          "type": "function_definition",
          "line_start": 1920,
          "line_end": 1947,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_recursively_but_doesnt_copy_revisions_if_told_not_to_do_so",
          "type": "function_definition",
          "line_start": 1949,
          "line_end": 1979,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 31,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_recursively_to_the_same_tree",
          "type": "function_definition",
          "line_start": 1981,
          "line_end": 1997,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_updates_user",
          "type": "function_definition",
          "line_start": 1999,
          "line_end": 2021,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2000,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2000,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4259,
          "ai_signals": [
            "High anti-pattern density (0.87)"
          ]
        },
        {
          "name": "test_copy_multi_table_inheritance",
          "type": "function_definition",
          "line_start": 2023,
          "line_end": 2057,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_tags",
          "type": "function_definition",
          "line_start": 2059,
          "line_end": 2086,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2063,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2466,
          "ai_signals": []
        },
        {
          "name": "test_copy_subclassed_page_copies_tags",
          "type": "function_definition",
          "line_start": 2088,
          "line_end": 2119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2094,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.231,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_m2m_relations",
          "type": "function_definition",
          "line_start": 2121,
          "line_end": 2142,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2132,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2807,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_generic_foreign_key",
          "type": "function_definition",
          "line_start": 2144,
          "line_end": 2162,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_o2o_relation",
          "type": "function_definition",
          "line_start": 2164,
          "line_end": 2174,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_additional_excluded_fields",
          "type": "function_definition",
          "line_start": 2176,
          "line_end": 2205,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "openai_no_structured_output",
              "severity": "medium",
              "line": 2200,
              "description": "JSON parsing of free-text response instead of using structured outputs \u2014 fragile, breaks on format changes",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "anthropic_response_json_no_validation",
              "severity": "medium",
              "line": 2200,
              "description": "Parsed JSON response not validated against schema -- wrong structure causes downstream errors",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "json_loads_no_error_handling",
              "severity": "high",
              "line": 2200,
              "description": "json.loads on LLM output without try/except -- LLM output is not guaranteed valid JSON, causing unhandled JSONDecodeError crashes",
              "fix_type": "deterministic"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_with_generic_relation",
          "type": "function_definition",
          "line_start": 2207,
          "line_end": 2225,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_excluded_parental_and_child_relations",
          "type": "function_definition",
          "line_start": 2227,
          "line_end": 2294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2227,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_with_excluded_parental_and_child_relations is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1731,
          "ai_signals": []
        },
        {
          "name": "test_copy_unsaved_page",
          "type": "function_definition",
          "line_start": 2296,
          "line_end": 2300,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_unique_uuids_in_orderables",
          "type": "function_definition",
          "line_start": 2302,
          "line_end": 2328,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_published_emits_signal",
          "type": "function_definition",
          "line_start": 2330,
          "line_end": 2352,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_unpublished_not_emits_signal",
          "type": "function_definition",
          "line_start": 2354,
          "line_end": 2372,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_keep_live_false_not_emits_signal",
          "type": "function_definition",
          "line_start": 2374,
          "line_end": 2389,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_alias_page",
          "type": "function_definition",
          "line_start": 2391,
          "line_end": 2405,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_copies_restriction",
          "type": "function_definition",
          "line_start": 2407,
          "line_end": 2424,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_does_not_copy_restrictions_from_parent",
          "type": "function_definition",
          "line_start": 2426,
          "line_end": 2452,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_does_not_copy_restrictions_when_new_parent_has_one_already",
          "type": "function_definition",
          "line_start": 2454,
          "line_end": 2481,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias",
          "type": "function_definition",
          "line_start": 2487,
          "line_end": 2512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_child_objects",
          "type": "function_definition",
          "line_start": 2514,
          "line_end": 2545,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_parental_relations",
          "type": "function_definition",
          "line_start": 2547,
          "line_end": 2580,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 34,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_doesnt_copy_revisions",
          "type": "function_definition",
          "line_start": 2582,
          "line_end": 2592,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_child_objects_with_nonspecific_class",
          "type": "function_definition",
          "line_start": 2594,
          "line_end": 2609,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_recursively",
          "type": "function_definition",
          "line_start": 2611,
          "line_end": 2639,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_recursively_with_child_objects",
          "type": "function_definition",
          "line_start": 2641,
          "line_end": 2669,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_doesnt_copy_recursively_to_the_same_tree",
          "type": "function_definition",
          "line_start": 2671,
          "line_end": 2684,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_updates_user",
          "type": "function_definition",
          "line_start": 2686,
          "line_end": 2699,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 2687,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 2687,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_create_alias_multi_table_inheritance",
          "type": "function_definition",
          "line_start": 2701,
          "line_end": 2735,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 35,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_copies_tags",
          "type": "function_definition",
          "line_start": 2737,
          "line_end": 2764,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 28,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2741,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2466,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_with_m2m_relations",
          "type": "function_definition",
          "line_start": 2766,
          "line_end": 2787,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2777,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2807,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_with_generic_foreign_key",
          "type": "function_definition",
          "line_start": 2789,
          "line_end": 2807,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_with_o2o_relation",
          "type": "function_definition",
          "line_start": 2809,
          "line_end": 2819,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_create_alias_with_additional_excluded_fields",
          "type": "decorated_definition",
          "line_start": 2821,
          "line_end": 2838,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "unittest.expectedFailure"
          ]
        },
        {
          "name": "test_create_alias_with_excluded_parental_and_child_relations",
          "type": "decorated_definition",
          "line_start": 2840,
          "line_end": 2905,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 66,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2840,
              "description": "Function is 66 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 66 lines (> 37 dynamic threshold)",
                "impact": "Function test_create_alias_with_excluded_parental_and_child_relations is 66 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.1746,
          "ai_signals": [],
          "decorators": [
            "unittest.expectedFailure"
          ]
        },
        {
          "name": "test_alias_page_copies_restriction",
          "type": "function_definition",
          "line_start": 2907,
          "line_end": 2930,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 2921,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.2674,
          "ai_signals": []
        },
        {
          "name": "test_alias_page_does_not_copy_restrictions_from_parent",
          "type": "function_definition",
          "line_start": 2932,
          "line_end": 2958,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_alias_page_does_not_copy_restrictions_when_new_parent_has_one_already",
          "type": "function_definition",
          "line_start": 2960,
          "line_end": 2989,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_update_aliases",
          "type": "function_definition",
          "line_start": 2995,
          "line_end": 3043,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 49,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 2995,
              "description": "Function is 49 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 49 lines (> 37 dynamic threshold)",
                "impact": "Function test_update_aliases is 49 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.193,
          "ai_signals": []
        },
        {
          "name": "test_update_aliases_publishes_drafts",
          "type": "function_definition",
          "line_start": 3045,
          "line_end": 3088,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 44,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3045,
              "description": "Function is 44 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 44 lines (> 37 dynamic threshold)",
                "impact": "Function test_update_aliases_publishes_drafts is 44 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.2011,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3094,
          "line_end": 3099,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_homepage",
          "type": "function_definition",
          "line_start": 3101,
          "line_end": 3121,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 21,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_homepage_slug_exists",
          "type": "function_definition",
          "line_start": 3123,
          "line_end": 3133,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_childpage",
          "type": "function_definition",
          "line_start": 3135,
          "line_end": 3167,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_childpage_without_parent",
          "type": "function_definition",
          "line_start": 3169,
          "line_end": 3173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_childpage_with_copy_parents",
          "type": "function_definition",
          "line_start": 3175,
          "line_end": 3194,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_copy_page_with_translatable_child_objects",
          "type": "function_definition",
          "line_start": 3196,
          "line_end": 3236,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 41,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3196,
              "description": "Function is 41 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 41 lines (> 37 dynamic threshold)",
                "impact": "Function test_copy_page_with_translatable_child_objects is 41 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.207,
          "ai_signals": []
        },
        {
          "name": "test_copies_missing_parents_as_aliases",
          "type": "function_definition",
          "line_start": 3238,
          "line_end": 3251,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_allowed_subpage_models",
          "type": "function_definition",
          "line_start": 3255,
          "line_end": 3271,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 17,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_allowed_parent_page_models",
          "type": "function_definition",
          "line_start": 3273,
          "line_end": 3288,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_can_exist_under",
          "type": "function_definition",
          "line_start": 3290,
          "line_end": 3304,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_can_create_at",
          "type": "function_definition",
          "line_start": 3306,
          "line_end": 3323,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_can_create_at_with_max_count_per_parent_limited_to_one",
          "type": "function_definition",
          "line_start": 3325,
          "line_end": 3346,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 22,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_can_move_to",
          "type": "function_definition",
          "line_start": 3348,
          "line_end": 3361,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_singleton_page_creation",
          "type": "function_definition",
          "line_start": 3363,
          "line_end": 3373,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_child_urls_updated_on_parent_publish",
          "type": "function_definition",
          "line_start": 3384,
          "line_end": 3394,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_publish_revision_doesnt_remove_latest_revision_created_at",
          "type": "function_definition",
          "line_start": 3403,
          "line_end": 3414,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_url_path_can_exceed_255_characters",
          "type": "function_definition",
          "line_start": 3424,
          "line_end": 3446,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_is_creatable_default",
          "type": "function_definition",
          "line_start": 3450,
          "line_end": 3453,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_is_creatable_false",
          "type": "function_definition",
          "line_start": 3455,
          "line_end": 3459,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_is_creatable_not_inherited",
          "type": "function_definition",
          "line_start": 3461,
          "line_end": 3467,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_abstract_pages",
          "type": "function_definition",
          "line_start": 3469,
          "line_end": 3474,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_deferred_page_classes_are_not_registered",
          "type": "function_definition",
          "line_start": 3478,
          "line_end": 3488,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 3482,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 3482,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 3482,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_page_manager",
          "type": "function_definition",
          "line_start": 3492,
          "line_end": 3496,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_subclass_manager",
          "type": "function_definition",
          "line_start": 3498,
          "line_end": 3504,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_custom_page_manager",
          "type": "function_definition",
          "line_start": 3506,
          "line_end": 3512,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_custom_page_queryset",
          "type": "function_definition",
          "line_start": 3514,
          "line_end": 3527,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_abstract_base_page_manager",
          "type": "function_definition",
          "line_start": 3529,
          "line_end": 3535,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_delete_content_type",
          "type": "function_definition",
          "line_start": 3545,
          "line_end": 3558,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3557,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3557,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_make_preview_request_for_accessible_page",
          "type": "function_definition",
          "line_start": 3564,
          "line_end": 3587,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3568,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2674,
          "ai_signals": []
        },
        {
          "name": "test_make_preview_request_for_accessible_page_https",
          "type": "function_definition",
          "line_start": 3589,
          "line_end": 3614,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3595,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2562,
          "ai_signals": []
        },
        {
          "name": "test_make_preview_request_for_accessible_page_non_standard_port",
          "type": "function_definition",
          "line_start": 3616,
          "line_end": 3641,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 26,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3622,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2562,
          "ai_signals": []
        },
        {
          "name": "test_make_preview_request_for_accessible_page_with_original_request",
          "type": "function_definition",
          "line_start": 3643,
          "line_end": 3690,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 48,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "multiagent_no_rate_limit_per_agent",
              "severity": "medium",
              "line": 3649,
              "description": "Multi-agent system without per-agent rate limiting \u2014 one agent monopolizes API",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3656,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3643,
              "description": "Function is 48 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 48 lines (> 37 dynamic threshold)",
                "impact": "Function test_make_preview_request_for_accessible_page_with_original_request is 48 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3403,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_make_preview_request_for_inaccessible_page_should_use_valid_host",
          "type": "decorated_definition",
          "line_start": 3692,
          "line_end": 3702,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3697,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4398,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"production.example.com\"])"
          ]
        },
        {
          "name": "test_make_preview_request_for_inaccessible_page_with_wildcard_allowed_hosts",
          "type": "decorated_definition",
          "line_start": 3704,
          "line_end": 3714,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 3711,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4398,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ],
          "decorators": [
            "override_settings(ALLOWED_HOSTS=[\"*\"])"
          ]
        },
        {
          "name": "test_is_previewable",
          "type": "function_definition",
          "line_start": 3716,
          "line_end": 3734,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 19,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_show_in_menus_default",
          "type": "function_definition",
          "line_start": 3744,
          "line_end": 3749,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_show_in_menus_default_override",
          "type": "function_definition",
          "line_start": 3751,
          "line_end": 3756,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_with_content_json_preserves_values",
          "type": "function_definition",
          "line_start": 3762,
          "line_end": 3829,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 68,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3762,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3762,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3764,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3764,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 3795,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3800,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3800,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3821,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3821,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 3762,
              "description": "Function is 68 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 68 lines (> 37 dynamic threshold)",
                "impact": "Function test_with_content_json_preserves_values is 68 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_content_json_preserves_first_published_at_when_none",
          "type": "function_definition",
          "line_start": 3831,
          "line_end": 3842,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3831,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3831,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 3834,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 3834,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_with_content_json_uses_first_published_at_when_provided",
          "type": "function_definition",
          "line_start": 3844,
          "line_end": 3855,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_doesnt_call_full_clean_before_save",
          "type": "function_definition",
          "line_start": 3861,
          "line_end": 3869,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_unpublish_also_unpublishes_aliases",
          "type": "function_definition",
          "line_start": 3871,
          "line_end": 3899,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 29,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3905,
          "line_end": 3910,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 3910,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 3910,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_golden_path",
          "type": "function_definition",
          "line_start": 3912,
          "line_end": 3921,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_translatable_models",
          "type": "function_definition",
          "line_start": 3925,
          "line_end": 3934,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_get_translatable_models_include_subclasses",
          "type": "function_definition",
          "line_start": 3936,
          "line_end": 3944,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3948,
          "line_end": 3949,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_default_locale",
          "type": "function_definition",
          "line_start": 3951,
          "line_end": 3956,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_override_default_locale",
          "type": "function_definition",
          "line_start": 3958,
          "line_end": 3967,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_always_defaults_to_parent_locale",
          "type": "function_definition",
          "line_start": 3969,
          "line_end": 3982,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 3989,
          "line_end": 3997,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_localized_same_language",
          "type": "function_definition",
          "line_start": 3999,
          "line_end": 4001,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_localized_different_language",
          "type": "function_definition",
          "line_start": 4003,
          "line_end": 4008,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_localized_different_language_with_wagtail_i18n_enabled_false",
          "type": "decorated_definition",
          "line_start": 4010,
          "line_end": 4015,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": [],
          "decorators": [
            "override_settings(WAGTAIL_I18N_ENABLED=False)"
          ]
        },
        {
          "name": "test_localized_different_language_unpublished",
          "type": "function_definition",
          "line_start": 4017,
          "line_end": 4026,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_localized_with_non_content_active_locale",
          "type": "function_definition",
          "line_start": 4028,
          "line_end": 4036,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_localized_with_missing_default_locale",
          "type": "function_definition",
          "line_start": 4038,
          "line_end": 4053,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_when_unlocked",
          "type": "function_definition",
          "line_start": 4059,
          "line_end": 4062,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_when_locked",
          "type": "function_definition",
          "line_start": 4064,
          "line_end": 4095,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 32,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4065,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4065,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3403,
          "ai_signals": [
            "High anti-pattern density (0.62)"
          ]
        },
        {
          "name": "test_when_locked_without_locked_at",
          "type": "function_definition",
          "line_start": 4097,
          "line_end": 4112,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4098,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4098,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4716,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_when_locked_globally",
          "type": "decorated_definition",
          "line_start": 4114,
          "line_end": 4146,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4116,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4116,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3337,
          "ai_signals": [
            "High anti-pattern density (0.61)"
          ],
          "decorators": [
            "override_settings(WAGTAILADMIN_GLOBAL_EDIT_LOCK=True)"
          ]
        },
        {
          "name": "test_when_locked_by_workflow",
          "type": "function_definition",
          "line_start": 4148,
          "line_end": 4180,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 33,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4149,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4149,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 4156,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4398,
          "ai_signals": [
            "High anti-pattern density (0.91)"
          ]
        },
        {
          "name": "test_when_scheduled_for_publish",
          "type": "function_definition",
          "line_start": 4182,
          "line_end": 4211,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 30,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 4210,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 4210,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3549,
          "ai_signals": [
            "High anti-pattern density (0.67)"
          ]
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4217,
          "line_end": 4219,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_cache_key_consistent",
          "type": "function_definition",
          "line_start": 4221,
          "line_end": 4223,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_no_queries",
          "type": "function_definition",
          "line_start": 4225,
          "line_end": 4228,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_changes_when_slug_changes",
          "type": "function_definition",
          "line_start": 4230,
          "line_end": 4234,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_cached_parent_obj_exists",
          "type": "function_definition",
          "line_start": 4240,
          "line_end": 4252,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4256,
          "line_end": 4268,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_with_password_restriction_authenticated_has_cache_headers",
          "type": "function_definition",
          "line_start": 4270,
          "line_end": 4294,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 25,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_with_password_restriction_has_cache_headers",
          "type": "function_definition",
          "line_start": 4296,
          "line_end": 4305,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_without_password_restriction_has_no_cache_headers",
          "type": "function_definition",
          "line_start": 4307,
          "line_end": 4313,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4317,
          "line_end": 4318,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "test_page_natural_key",
          "type": "function_definition",
          "line_start": 4320,
          "line_end": 4325,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 4329,
          "line_end": 4331,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        },
        {
          "name": "_submit_page_form",
          "type": "function_definition",
          "line_start": 4333,
          "line_end": 4356,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 24,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 4341,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 4344,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4133,
          "ai_signals": [
            "High anti-pattern density (0.83)"
          ]
        },
        {
          "name": "test_create_simple_page_with_auto_slug",
          "type": "function_definition",
          "line_start": 4358,
          "line_end": 4367,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1216,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 224,
        "avg_function_length": 17.38,
        "function_length_stddev": 13.07,
        "import_count": 28,
        "export_count": 0,
        "comment_lines": 533,
        "code_lines": 3835,
        "comment_ratio": 0.122,
        "comment_what_ratio": 0.3602,
        "naming_avg_length": 7.99,
        "debug_artifacts": [],
        "ai_smell_count": 133,
        "ai_smell_density": 0.034681,
        "structural_uniformity": 0.2478,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 88.17,
        "mechanical": 88.17,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_search_fields.py",
      "language": "python",
      "line_count": 70,
      "token_estimate": 572,
      "functions": [
        {
          "name": "patch_search_fields",
          "type": "decorated_definition",
          "line_start": 14,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1739,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.75)"
          ],
          "decorators": [
            "contextmanager"
          ]
        },
        {
          "name": "test_checking_core_page_fields_are_indexed",
          "type": "function_definition",
          "line_start": 27,
          "line_end": 69,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 41,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 27,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function test_checking_core_page_fields_are_indexed is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.3367,
          "ai_signals": [
            "Comments explain 'what' not 'why' (0.75)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 26.5,
        "function_length_stddev": 23.33,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 9,
        "code_lines": 61,
        "comment_ratio": 0.1286,
        "comment_what_ratio": 0.75,
        "naming_avg_length": 7.47,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.032787,
        "structural_uniformity": 0.1195,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 84.1,
        "mechanical": 84.1,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\tests\\test_whitelist.py",
      "language": "python",
      "line_count": 162,
      "token_estimate": 1373,
      "functions": [
        {
          "name": "test_allowed_url_schemes",
          "type": "function_definition",
          "line_start": 13,
          "line_end": 16,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 14,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4625,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "test_disallowed_url_scheme",
          "type": "function_definition",
          "line_start": 18,
          "line_end": 19,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_crafty_disallowed_url_scheme",
          "type": "function_definition",
          "line_start": 21,
          "line_end": 26,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 30,
          "line_end": 31,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_no_rule_for_attr",
          "type": "function_definition",
          "line_start": 33,
          "line_end": 41,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_rule_true_for_attr",
          "type": "function_definition",
          "line_start": 43,
          "line_end": 51,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_rule_false_for_attr",
          "type": "function_definition",
          "line_start": 53,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_callable_called_on_attr",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_callable_returns_None",
          "type": "function_definition",
          "line_start": 74,
          "line_end": 83,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 10,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_allow_without_attributes",
          "type": "function_definition",
          "line_start": 85,
          "line_end": 95,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 99,
          "line_end": 100,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_unknown_node",
          "type": "function_definition",
          "line_start": 102,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_tag_node_cleans_nested_recognised_node",
          "type": "function_definition",
          "line_start": 111,
          "line_end": 119,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_tag_node_disallows_nested_unrecognised_node",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_string_node_does_nothing",
          "type": "function_definition",
          "line_start": 130,
          "line_end": 134,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_node_does_not_change_navigable_strings",
          "type": "function_definition",
          "line_start": 136,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 149,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_clean_comments",
          "type": "function_definition",
          "line_start": 151,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        },
        {
          "name": "test_quoting",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 161,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1125,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 19,
        "avg_function_length": 6.68,
        "function_length_stddev": 2.93,
        "import_count": 3,
        "export_count": 0,
        "comment_lines": 44,
        "code_lines": 118,
        "comment_ratio": 0.2716,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 6.73,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.008475,
        "structural_uniformity": 0.5623,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 97.59,
        "mechanical": 97.59,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\forms.py",
      "language": "python",
      "line_count": 417,
      "token_estimate": 3618,
      "functions": [
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 39,
          "line_end": 53,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "username_field",
          "type": "decorated_definition",
          "line_start": 55,
          "line_end": 57,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "separate_username_field",
          "type": "function_definition",
          "line_start": 59,
          "line_end": 60,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "password_required",
          "type": "decorated_definition",
          "line_start": 66,
          "line_end": 68,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "password_enabled",
          "type": "decorated_definition",
          "line_start": 70,
          "line_end": 72,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": [],
          "decorators": [
            "property"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 104,
          "line_end": 116,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "_clean_username",
          "type": "function_definition",
          "line_start": 121,
          "line_end": 140,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 20,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "clean_password2",
          "type": "function_definition",
          "line_start": 142,
          "line_end": 154,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "validate_password",
          "type": "function_definition",
          "line_start": 156,
          "line_end": 166,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 11,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "_post_clean",
          "type": "function_definition",
          "line_start": 168,
          "line_end": 173,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 172,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4348,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "_clean_fields",
          "type": "function_definition",
          "line_start": 175,
          "line_end": 177,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 3,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 179,
          "line_end": 190,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 1,
            "line_count": 12,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 203,
          "line_end": 209,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 218,
          "line_end": 225,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 2,
            "line_count": 8,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 221,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "guardrails_no_prompt_injection_check",
              "severity": "critical",
              "line": 225,
              "description": "User input sent to LLM without prompt injection detection -- attacker can override system instructions and safety rules",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4348,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "clean_name",
          "type": "function_definition",
          "line_start": 249,
          "line_end": 257,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "function_definition",
          "line_start": 259,
          "line_end": 276,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 1,
            "parameter_count": 1,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "eval_no_cost_budget",
              "severity": "high",
              "line": 270,
              "description": "Evaluation pipeline without cost limits -- a misconfigured eval run can burn through API budget",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 271,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 275,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4348,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        },
        {
          "name": "__init__",
          "type": "function_definition",
          "line_start": 313,
          "line_end": 339,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 1,
            "parameter_count": 4,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 313,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_prefix_mode_not_used",
              "severity": "low",
              "line": 339,
              "description": "Mistral prompt without prefix mode for constrained generation",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.3441,
          "ai_signals": [
            "High anti-pattern density (0.74)"
          ]
        },
        {
          "name": "clean",
          "type": "function_definition",
          "line_start": 341,
          "line_end": 358,
          "metrics": {
            "cyclomatic_complexity": 3,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 18,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        },
        {
          "name": "save",
          "type": "decorated_definition",
          "line_start": 360,
          "line_end": 402,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 43,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 375,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 376,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 377,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 384,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 386,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 360,
              "description": "Function is 43 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 43 lines (> 37 dynamic threshold)",
                "impact": "Function save is 43 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.4348,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "transaction.atomic"
          ]
        },
        {
          "name": "as_admin_panel",
          "type": "function_definition",
          "line_start": 404,
          "line_end": 408,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0848,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 20,
        "avg_function_length": 11.95,
        "function_length_stddev": 9.98,
        "import_count": 14,
        "export_count": 0,
        "comment_lines": 43,
        "code_lines": 374,
        "comment_ratio": 0.1031,
        "comment_what_ratio": 0.2593,
        "naming_avg_length": 7.69,
        "debug_artifacts": [],
        "ai_smell_count": 14,
        "ai_smell_density": 0.037433,
        "structural_uniformity": 0.1647,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 85.56,
        "mechanical": 85.56,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\migrations\\0008_userprofile_avatar.py",
      "language": "python",
      "line_count": 24,
      "token_estimate": 143,
      "functions": [],
      "file_metrics": {
        "total_functions": 0,
        "avg_function_length": 0.0,
        "function_length_stddev": 0.0,
        "import_count": 2,
        "export_count": 0,
        "comment_lines": 1,
        "code_lines": 23,
        "comment_ratio": 0.0417,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.03,
        "debug_artifacts": [],
        "ai_smell_count": 0,
        "ai_smell_density": 0.0,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 100.0,
        "mechanical": 100.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\tests\\test_bulk_actions\\test_bulk_assign_role.py",
      "language": "python",
      "line_count": 110,
      "token_estimate": 976,
      "functions": [
        {
          "name": "setUp",
          "type": "function_definition",
          "line_start": 14,
          "line_end": 40,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 27,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 30,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 38,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4986,
          "ai_signals": [
            "High anti-pattern density (0.74)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_simple",
          "type": "function_definition",
          "line_start": 42,
          "line_end": 47,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "bedrock_no_output_sanitization",
              "severity": "critical",
              "line": 46,
              "description": "Model output rendered in HTML without sanitization -- XSS risk",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5893,
          "ai_signals": [
            "High anti-pattern density (1.00)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_bulk_toggle",
          "type": "function_definition",
          "line_start": 49,
          "line_end": 61,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 56,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5086,
          "ai_signals": [
            "High anti-pattern density (0.77)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_before_toggle_user_hook_post",
          "type": "function_definition",
          "line_start": 63,
          "line_end": 85,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 78,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 80,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5437,
          "ai_signals": [
            "High anti-pattern density (0.87)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        },
        {
          "name": "test_after_toggle_user_hook",
          "type": "function_definition",
          "line_start": 87,
          "line_end": 109,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 0,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "guardrails_pii_not_filtered",
              "severity": "critical",
              "line": 102,
              "description": "LLM output returned without PII filtering -- personal data (SSN, email, phone, address) may leak to unauthorized users",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 104,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.5437,
          "ai_signals": [
            "High anti-pattern density (0.87)",
            "Comments explain 'what' not 'why' (0.67)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 5,
        "avg_function_length": 18.4,
        "function_length_stddev": 8.65,
        "import_count": 7,
        "export_count": 0,
        "comment_lines": 3,
        "code_lines": 107,
        "comment_ratio": 0.0273,
        "comment_what_ratio": 0.6667,
        "naming_avg_length": 7.39,
        "debug_artifacts": [],
        "ai_smell_count": 8,
        "ai_smell_density": 0.074766,
        "structural_uniformity": 0.53,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 74.39,
        "mechanical": 74.39,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\users\\views\\bulk_actions\\assign_role.py",
      "language": "python",
      "line_count": 47,
      "token_estimate": 392,
      "functions": [
        {
          "name": "check_perm",
          "type": "function_definition",
          "line_start": 22,
          "line_end": 23,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 2,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0869,
          "ai_signals": []
        },
        {
          "name": "get_execution_context",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 28,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 4,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0869,
          "ai_signals": []
        },
        {
          "name": "execute_action",
          "type": "decorated_definition",
          "line_start": 30,
          "line_end": 36,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 3,
            "line_count": 7,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "vectordb_stale_vectors_no_cleanup",
              "severity": "medium",
              "line": 34,
              "description": "Embedding new document versions without deleting old vectors -- stale data pollutes search results",
              "fix_type": "structural_rewrite"
            }
          ],
          "ai_confidence": 0.4369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "classmethod"
          ]
        },
        {
          "name": "get_success_message",
          "type": "function_definition",
          "line_start": 38,
          "line_end": 46,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 2,
            "line_count": 9,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "eval_no_failure_categorization",
              "severity": "medium",
              "line": 38,
              "description": "Eval failures reported as pass/fail without categorization -- cannot prioritize which failure modes to fix first",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.4369,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 4,
        "avg_function_length": 5.5,
        "function_length_stddev": 3.11,
        "import_count": 6,
        "export_count": 0,
        "comment_lines": 0,
        "code_lines": 47,
        "comment_ratio": 0.0,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.42,
        "debug_artifacts": [],
        "ai_smell_count": 2,
        "ai_smell_density": 0.042553,
        "structural_uniformity": 0.4347,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 89.36,
        "mechanical": 89.36,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\utils\\sendfile_streaming_backend.py",
      "language": "python",
      "line_count": 51,
      "token_estimate": 347,
      "functions": [
        {
          "name": "sendfile",
          "type": "function_definition",
          "line_start": 12,
          "line_end": 25,
          "metrics": {
            "cyclomatic_complexity": 2,
            "max_nesting_depth": 1,
            "parameter_count": 3,
            "line_count": 14,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.1312,
          "ai_signals": []
        },
        {
          "name": "was_modified_since",
          "type": "function_definition",
          "line_start": 28,
          "line_end": 50,
          "metrics": {
            "cyclomatic_complexity": 4,
            "max_nesting_depth": 2,
            "parameter_count": 2,
            "line_count": 23,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 1
          },
          "anti_patterns": [
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 48,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.2834,
          "ai_signals": []
        }
      ],
      "file_metrics": {
        "total_functions": 2,
        "avg_function_length": 18.5,
        "function_length_stddev": 6.36,
        "import_count": 5,
        "export_count": 0,
        "comment_lines": 13,
        "code_lines": 38,
        "comment_ratio": 0.2549,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 7.17,
        "debug_artifacts": [],
        "ai_smell_count": 1,
        "ai_smell_density": 0.026316,
        "structural_uniformity": 0.656,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 81.37,
        "mechanical": 81.37,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    },
    {
      "path": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\wagtail_hooks.py",
      "language": "python",
      "line_count": 592,
      "token_estimate": 5907,
      "functions": [
        {
          "name": "require_wagtail_login",
          "type": "function_definition",
          "line_start": 25,
          "line_end": 29,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 5,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": []
        },
        {
          "name": "check_view_restrictions",
          "type": "decorated_definition",
          "line_start": 32,
          "line_end": 76,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 45,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 32,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 32,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 34,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 34,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "pinecone_no_batch_upsert",
              "severity": "high",
              "line": 44,
              "description": "Upserting vectors one at a time instead of batching -- extremely slow and wastes API calls",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 58,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 58,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 71,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 71,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 32,
              "description": "Function is 45 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 45 lines (> 37 dynamic threshold)",
                "impact": "Function check_view_restrictions is 45 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"on_serve_page\")"
          ]
        },
        {
          "name": "register_core_features",
          "type": "decorated_definition",
          "line_start": 79,
          "line_end": 94,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 16,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"register_rich_text_features\")"
          ]
        },
        {
          "name": "register_workflow_permissions",
          "type": "decorated_definition",
          "line_start": 99,
          "line_end": 104,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 102,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        },
        {
          "name": "register_task_permissions",
          "type": "decorated_definition",
          "line_start": 106,
          "line_end": 111,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 0,
            "line_count": 6,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 109,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_permissions\")"
          ]
        },
        {
          "name": "describe_collection_children",
          "type": "decorated_definition",
          "line_start": 114,
          "line_end": 128,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 15,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [],
          "ai_confidence": 0.0,
          "ai_signals": [],
          "decorators": [
            "hooks.register(\"describe_collection_contents\")"
          ]
        },
        {
          "name": "register_core_log_actions",
          "type": "decorated_definition",
          "line_start": 131,
          "line_end": 500,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 370,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 133,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 133,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 133,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 133,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 133,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 133,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 133,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_eval_mode",
              "severity": "high",
              "line": 134,
              "description": "Model inference without model.eval() -- dropout and batchnorm still active, corrupting predictions",
              "fix_type": "deterministic"
            },
            {
              "id": "mlops_no_model_card",
              "severity": "low",
              "line": 134,
              "description": "Model deployed without model card -- no documentation of limitations and intended use",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_a_b_testing",
              "severity": "medium",
              "line": 134,
              "description": "New model deployed directly without A/B comparison -- no evidence it is better",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_rollback_plan",
              "severity": "high",
              "line": 134,
              "description": "Model deployed without rollback capability -- bad model stays in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_inference_latency_tracking",
              "severity": "medium",
              "line": 134,
              "description": "Inference latency not measured -- SLA violations go undetected",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_bias_check",
              "severity": "high",
              "line": 134,
              "description": "Model deployed without bias/fairness evaluation -- discriminatory predictions in production",
              "fix_type": "structural_rewrite"
            },
            {
              "id": "mlops_no_model_versioning",
              "severity": "high",
              "line": 134,
              "description": "Model deployed without version tracking \u2014 can't rollback",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 160,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 168,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 173,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 187,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 192,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 199,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 204,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 215,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 220,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 227,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 232,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 239,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 244,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 252,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 257,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 264,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 269,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 297,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 302,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 334,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 339,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 346,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 351,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 358,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 363,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 372,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 377,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 379,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 388,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 393,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 399,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 404,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 409,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 415,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 420,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 425,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 431,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 436,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 441,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 447,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 452,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 457,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 463,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 468,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 475,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 481,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 486,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 493,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 499,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 131,
              "description": "Function is 370 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 370 lines (> 37 dynamic threshold)",
                "impact": "Function register_core_log_actions is 370 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_log_actions\")"
          ]
        },
        {
          "name": "register_workflow_log_actions",
          "type": "decorated_definition",
          "line_start": 503,
          "line_end": 576,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 1,
            "line_count": 74,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 511,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 519,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 524,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 538,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 543,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 550,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 555,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 562,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mistral_classification_no_labels",
              "severity": "medium",
              "line": 567,
              "description": "Mistral classification without predefined labels \u2014 inconsistent output",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "observability_no_error_capture",
              "severity": "high",
              "line": 575,
              "description": "LLM errors not captured in traces -- failures are invisible in the observability dashboard",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "function-too-long",
              "severity": "medium",
              "line": 503,
              "description": "Function is 74 lines (> 37 dynamic threshold)",
              "fix_type": "cataloged_refactor",
              "evidence": {
                "detection_method": "metric-threshold",
                "proof": "Function is 74 lines (> 37 dynamic threshold)",
                "impact": "Function register_workflow_log_actions is 74 lines \u2014 exceeds 37 dynamic threshold",
                "recommendation": "Decompose into smaller, single-responsibility functions",
                "confidence": 0.85,
                "fix_type": "cataloged_refactor",
                "references": []
              }
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"register_log_actions\")"
          ]
        },
        {
          "name": "check_request_method",
          "type": "decorated_definition",
          "line_start": 579,
          "line_end": 591,
          "metrics": {
            "cyclomatic_complexity": 1,
            "max_nesting_depth": 0,
            "parameter_count": 4,
            "line_count": 13,
            "any_count": 0,
            "non_null_assertions": 0,
            "useState_count": 0,
            "useEffect_count": 0,
            "try_catch_count": 0
          },
          "anti_patterns": [
            {
              "id": "mlops_no_ab_test",
              "severity": "medium",
              "line": 579,
              "description": "New model deployed without A/B test \u2014 risky full cutover",
              "fix_type": "cataloged_refactor"
            },
            {
              "id": "mlops_no_serving_healthcheck",
              "severity": "high",
              "line": 579,
              "description": "Model serving without health check endpoint \u2014 silent failures",
              "fix_type": "cataloged_refactor"
            }
          ],
          "ai_confidence": 0.35,
          "ai_signals": [
            "High anti-pattern density (1.00)"
          ],
          "decorators": [
            "hooks.register(\"before_serve_page\", order=0)"
          ]
        }
      ],
      "file_metrics": {
        "total_functions": 9,
        "avg_function_length": 61.11,
        "function_length_stddev": 118.08,
        "import_count": 19,
        "export_count": 0,
        "comment_lines": 18,
        "code_lines": 574,
        "comment_ratio": 0.0304,
        "comment_what_ratio": 0.0,
        "naming_avg_length": 8.8,
        "debug_artifacts": [],
        "ai_smell_count": 89,
        "ai_smell_density": 0.155052,
        "structural_uniformity": 0.0,
        "ai_debt_score": 0.0,
        "suppressed_findings": 0,
        "unused_imports": 0
      },
      "baseline_comparison": null,
      "health_score": {
        "composite": 60.0,
        "mechanical": 60.0,
        "subjective": 0.0,
        "weights": {
          "mechanical": 1.0,
          "subjective": 0.0
        }
      }
    }
  ],
  "summary": {
    "files_analyzed": 1143,
    "files_skipped": 140,
    "skip_reasons": {
      "generated_code": 0,
      "binary": 0,
      "minified": 5,
      "empty": 130,
      "too_large": 0,
      "no_grammar": 0,
      "permission_denied": 0,
      "ignored": 0,
      "parse_error": 5
    },
    "total_functions": 12210,
    "total_anti_patterns": 14430,
    "anti_patterns_by_severity": {
      "critical": 2975,
      "high": 3703,
      "medium": 7274,
      "low": 478
    },
    "ai_authored_functions": 3,
    "worst_file": "K:\\TrueMend\\benchmarks\\validation\\wagtail\\wagtail\\admin\\static_src\\wagtailadmin\\js\\vendor\\jquery.ba-throttle-debounce.min.js",
    "ci_pass": null,
    "threshold_violations": [],
    "health_score": {
      "composite": 88.53,
      "mechanical": 88.53,
      "subjective": 0.0,
      "weights": {
        "mechanical": 1.0,
        "subjective": 0.0
      }
    }
  }
}
